Skip to content
Snippets Groups Projects
Unverified Commit b888ddde authored by Casey's avatar Casey :recycle:
Browse files

test: conftest: adjust pmaports fixture (MR 2477)


make sure that calls to get_upstream_remote() will succeed by setting
pmb.config.git_repos() for the entire run. This might pollute some other
tests...

TODO: make less things depend on pmaports being cloned...

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent 29b9a57c
Branches
No related tags found
No related merge requests found
......@@ -161,14 +161,14 @@ def pmaports(pmb_args, monkeypatch):
config = get_context().config
with monkeypatch.context() as m:
# Speed things up by cloning from the local checkout if it exists.
if Config.aports[0].exists():
m.setitem(pmb.config.git_repos, "pmaports", Config.aports)
if Config.aports[-1].exists():
pmb.config.git_repos["pmaports"] = [str(Config.aports[-1])]
if not config.aports[-1].exists():
pmb.helpers.git.clone("pmaports")
assert pmb.helpers.run.user(["git", "checkout", "master"], working_dir=config.aports[0]) == 0
assert (
pmb.helpers.run.user(["git", "checkout", "master"], working_dir=config.aports[0]) == 0
)
@pytest.fixture
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment