summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-09-23 11:41:49 +0200
committerJürg Billeter <j@bitron.ch>2020-09-23 11:43:14 +0200
commit2115c8c0d313a151419825507047904066bb2924 (patch)
treefe7151b5c157ae1f924bf3c3bbe0c4b6830bb5eb
parentcfa40988bc0934935b1db95de7f058273849813c (diff)
downloadbuildstream-juerg/filter-pass-integration.tar.gz
tests/elements/filter.py: Add test_filter_pass_integration_uncachedjuerg/filter-pass-integration
This tests that built filter artifacts don't depend on build dependencies for integration.
-rw-r--r--tests/elements/filter.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 443f64d34..5fafa2d2d 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -507,6 +507,30 @@ def test_filter_pass_integration(datafiles, cli):
@pytest.mark.datafiles(os.path.join(DATA_DIR, "basic"))
+def test_filter_pass_integration_uncached(datafiles, cli):
+ project = str(datafiles)
+
+ # Passing integration commands should build nicely
+ result = cli.run(project=project, args=["build", "pass-integration.bst"])
+ result.assert_success()
+
+ # Delete the build dependency of the filter element.
+ # The built filter element should be usable even if the build dependency
+ # is not available in the local cache.
+ result = cli.run(project=project, args=["artifact", "delete", "input.bst"])
+ result.assert_success()
+
+ # Checking out the artifact should fail if we run integration commands, as
+ # the staged artifacts don't have a shell
+ checkout_dir = os.path.join(project, "pass")
+ result = cli.run(
+ project=project,
+ args=["artifact", "checkout", "--integrate", "--directory", checkout_dir, "pass-integration.bst"],
+ )
+ result.assert_main_error(ErrorDomain.STREAM, "missing-command")
+
+
+@pytest.mark.datafiles(os.path.join(DATA_DIR, "basic"))
def test_filter_stack_depend_failure(datafiles, cli):
project = str(datafiles)