summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-09-29 11:55:20 +0200
committerJürg Billeter <j@bitron.ch>2020-09-29 17:54:34 +0200
commit498e683e1defb3fe919ee14ce26f43868ec1c3c8 (patch)
treee46d8ac529d65a640034ac1b76c5c44fb2e92689 /tests
parentc83217694faf365f3a94be03bb684a5a3e1c2d5a (diff)
downloadbuildstream-498e683e1defb3fe919ee14ce26f43868ec1c3c8.tar.gz
_stream.py: Pull missing artifacts in push()juerg/push
As per #819, BuildStream should pull missing artifacts by default. The previous behavior was to only pull missing buildtrees. A top-level `--no-pull` option can easily be supported in the future. This change makes it possible to use a single scheduler session (with concurrent pull and push jobs). This commit also simplifies the code as it removes the `sched_error_action` emulation, using the regular frontend code path instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/frontend/push.py12
-rw-r--r--tests/integration/pullbuildtrees.py2
2 files changed, 2 insertions, 12 deletions
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index ffcc166f9..4b10b5bcd 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -239,16 +239,8 @@ def test_push_fails_with_on_error_continue(cli, tmpdir, datafiles):
assert_shared(cli, share, project, "target.bst")
assert_not_shared(cli, share, project, "import-dev.bst")
- errors = [
- "import-dev.bst is not cached",
- (
- "Error while pushing. The following elements were not pushed as they are not yet cached:\n"
- "\n"
- "\timport-dev.bst\n"
- ),
- ]
- for error in errors:
- assert error in result.stderr
+
+ assert "Push failed: import-dev.bst is not cached" in result.stderr
# Tests that `bst artifact push --deps DEPS` pushes selected dependencies of
diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index 6d9eefb26..5923ce544 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -142,7 +142,6 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles):
assert element_name in result.get_pulled_elements()
cli2.configure({"artifacts": {"url": share3.repo, "push": True}})
result = cli2.run(project=project, args=["--pull-buildtrees", "artifact", "push", element_name])
- assert "Attempting to fetch missing artifact buildtrees" in result.stderr
assert element_name not in result.get_pulled_elements()
with cli2.artifact.extract_buildtree(cwd, cwd, artifact_name) as buildtreedir:
assert not buildtreedir
@@ -155,7 +154,6 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles):
# without exlipictly requiring a bst artifact pull.
cli2.configure({"artifacts": [{"url": share1.repo, "push": False}, {"url": share3.repo, "push": True}]})
result = cli2.run(project=project, args=["--pull-buildtrees", "artifact", "push", element_name])
- assert "Attempting to fetch missing artifact buildtrees" in result.stderr
assert element_name in result.get_pulled_elements()
with cli2.artifact.extract_buildtree(cwd, cwd, artifact_name) as buildtreedir:
assert os.path.isdir(buildtreedir)