diff options
author | Josh Smith <josh.smith@codethink.co.uk> | 2020-09-04 15:14:19 +0100 |
---|---|---|
committer | Josh Smith <josh.smith@codethink.co.uk> | 2020-09-04 16:21:38 +0100 |
commit | bb4de5c0bdf3060054788fa3526e9b45acc377fe (patch) | |
tree | a85b8736c2d169d2ef444309455235e0e2536baa | |
parent | 2efbc5340fcae577097351c8ca540143a9c92c94 (diff) | |
download | buildstream-qinusty/bb-remote-asset-rx.tar.gz |
Remove create_artifact_share usages for remoteexecution testsqinusty/bb-remote-asset-rx
-rw-r--r-- | tests/remoteexecution/buildtree.py | 47 | ||||
-rw-r--r-- | tests/remoteexecution/partial.py | 20 |
2 files changed, 28 insertions, 39 deletions
diff --git a/tests/remoteexecution/buildtree.py b/tests/remoteexecution/buildtree.py index 57e25cd14..3b86cb7de 100644 --- a/tests/remoteexecution/buildtree.py +++ b/tests/remoteexecution/buildtree.py @@ -37,34 +37,33 @@ def test_buildtree_remote(cli, tmpdir, datafiles): element_name = "build-shell/buildtree.bst" share_path = os.path.join(str(tmpdir), "share") - services = cli.ensure_services() - assert set(services) == set(["action-cache", "execution", "storage"]) + services = cli.ensure_services(artifacts=True) + assert set(services) == set(["action-cache", "execution", "storage", "artifact-cache"]) - with create_artifact_share(share_path) as share: - cli.configure({"artifacts": {"url": share.repo, "push": True}, "cache": {"pull-buildtrees": False}}) + cli.configure("cache": {"pull-buildtrees": False}}) - res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name]) - res.assert_success() + res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name]) + res.assert_success() - # remove local cache - shutil.rmtree(os.path.join(str(tmpdir), "cache", "cas")) - shutil.rmtree(os.path.join(str(tmpdir), "cache", "artifacts")) + # remove local cache + shutil.rmtree(os.path.join(str(tmpdir), "cache", "cas")) + shutil.rmtree(os.path.join(str(tmpdir), "cache", "artifacts")) - # pull without buildtree - res = cli.run(project=project, args=["artifact", "pull", "--deps", "all", element_name]) - res.assert_success() + # pull without buildtree + res = cli.run(project=project, args=["artifact", "pull", "--deps", "all", element_name]) + res.assert_success() - # check shell doesn't work - res = cli.run(project=project, args=["shell", "--build", element_name, "--", "cat", "test"]) - res.assert_shell_error() + # check shell doesn't work + res = cli.run(project=project, args=["shell", "--build", element_name, "--", "cat", "test"]) + res.assert_shell_error() - # pull with buildtree - res = cli.run(project=project, args=["--pull-buildtrees", "artifact", "pull", "--deps", "all", element_name]) - res.assert_success() + # pull with buildtree + res = cli.run(project=project, args=["--pull-buildtrees", "artifact", "pull", "--deps", "all", element_name]) + res.assert_success() - # check it works this time - res = cli.run( - project=project, args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "cat", "test"] - ) - res.assert_success() - assert "Hi" in res.output + # check it works this time + res = cli.run( + project=project, args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "cat", "test"] + ) + res.assert_success() + assert "Hi" in res.output diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py index ec5fabedb..f28330241 100644 --- a/tests/remoteexecution/partial.py +++ b/tests/remoteexecution/partial.py @@ -8,9 +8,6 @@ from buildstream.exceptions import ErrorDomain from buildstream.testing import cli_remote_execution as cli # pylint: disable=unused-import from buildstream.testing.integration import assert_contains -from tests.testutils.artifactshare import create_artifact_share - - pytestmark = pytest.mark.remoteexecution @@ -65,17 +62,10 @@ def test_build_partial_push(cli, tmpdir, datafiles): element_name = "no-runtime-deps.bst" builddep_element_name = "autotools/amhello.bst" - with create_artifact_share(share_dir) as share: - - services = cli.ensure_services() - assert set(services) == set(["action-cache", "execution", "storage"]) - - cli.config["artifacts"] = { - "url": share.repo, - "push": True, - } + services = cli.ensure_services(artifacts=True) + assert set(services) == set(["action-cache", "execution", "storage", "artifact-cache"]) - res = cli.run(project=project, args=["build", element_name]) - res.assert_success() + res = cli.run(project=project, args=["build", element_name]) + res.assert_success() - assert builddep_element_name in res.get_pushed_elements() + assert builddep_element_name in res.get_pushed_elements() |