1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-14 11:59:47 +03:00

test: add dummy pmaports repo

Add a dummmy version of pmaports for testing. This gives us much better
control and simplifies a lot of the logic.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
Casey Connolly 2025-05-26 18:04:13 +02:00
parent 49a86cc303
commit 1bcc24f65a
14 changed files with 357 additions and 3 deletions

View file

@ -28,10 +28,13 @@ def config_file(tmp_path_factory, request):
flavour = request.param
out_file = tmp_path / "pmbootstrap_v3.cfg"
workdir = tmp_path / "work"
workdir.mkdir()
workdir = tmp_path / "cache"
if not (workdir / "git").exists():
(workdir / "git").mkdir(exist_ok=True, parents=True)
# Copy our test pmaports to the workdir
shutil.copytree(Path("./test/data/pmaports"), (workdir / "cache/git/pmaports"))
configs = {"default": f"aports = {workdir / 'cache_git' / 'pmaports'}", "no-repos": "aports = "}
configs = {"default": f"aports = {workdir / 'cache/git/pmaports'}", "no-repos": "aports = "}
file = _testdir / "pmbootstrap_v3.cfg"
print(f"CONFIG: {out_file}")