summaryrefslogtreecommitdiff
path: root/tests/frontend/buildcheckout.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/frontend/buildcheckout.py')
-rw-r--r--tests/frontend/buildcheckout.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index 1299fa190..03bba0b26 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -86,13 +86,14 @@ def test_build_invalid_suffix_dep(datafiles, cli, strict, hardlinks):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize("deps", [("run"), ("none")])
+@pytest.mark.parametrize("deps", [("run"), ("none"), ("build")])
def test_build_checkout_deps(datafiles, cli, deps):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'checkout')
+ element_name = "checkout-deps.bst"
# First build it
- result = cli.run(project=project, args=['build', 'target.bst'])
+ result = cli.run(project=project, args=['build', element_name])
result.assert_success()
# Assert that after a successful build, the builddir is empty
@@ -101,20 +102,25 @@ def test_build_checkout_deps(datafiles, cli, deps):
assert not os.listdir(builddir)
# Now check it out
- result = cli.run(project=project, args=['checkout', 'target.bst', '--deps', deps, checkout])
+ result = cli.run(project=project, args=['checkout', element_name, '--deps', deps, checkout])
result.assert_success()
- # Check that the executable hello file is found in the checkout
- filename = os.path.join(checkout, 'usr', 'bin', 'hello')
+ # Verify output of this element
+ filename = os.path.join(checkout, 'etc', 'buildstream', 'config')
+ if deps == "build":
+ assert not os.path.exists(filename)
+ else:
+ assert os.path.exists(filename)
- if deps == "run":
+ # Verify output of this element's build dependencies
+ filename = os.path.join(checkout, 'usr', 'include', 'pony.h')
+ if deps == "build":
assert os.path.exists(filename)
else:
assert not os.path.exists(filename)
- # Check that the executable hello file is found in the checkout
- filename = os.path.join(checkout, 'usr', 'include', 'pony.h')
-
+ # Verify output of this element's runtime dependencies
+ filename = os.path.join(checkout, 'usr', 'bin', 'hello')
if deps == "run":
assert os.path.exists(filename)
else: