summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-19 18:32:08 +0100
committerJürg Billeter <j@bitron.ch>2019-03-19 18:41:13 +0100
commit9bcbc2bbb6fb4aabf50e22807cda74b5fc114f65 (patch)
tree72622cf6f9d23a467bee2ce5ee2dafd64f65b13c
parent69a2ebf6018009c77c9fb511971ef82efd0fdc51 (diff)
downloadbuildstream-juerg/pipeline.tar.gz
tests/frontend/workspace.py: Expand test to cover the case without stackjuerg/pipeline
This covers the case where the target element build-only depends on an element that runtime-only depends on a workspace.
-rw-r--r--tests/frontend/workspace.py10
-rw-r--r--tests/frontend/workspaced-build-dep/elements/elem5.bst8
-rw-r--r--tests/frontend/workspaced-runtime-dep/elements/elem5.bst8
3 files changed, 21 insertions, 5 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 6055c804c..3d478662d 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -1239,15 +1239,15 @@ TEST_DIR = os.path.join(
@pytest.mark.parametrize(
["case", "non_workspaced_elements_state"],
[
- ("workspaced-build-dep", ["waiting", "waiting", "waiting", "waiting"]),
- ("workspaced-runtime-dep", ["buildable", "buildable", "waiting", "waiting"])
+ ("workspaced-build-dep", ["waiting", "waiting", "waiting", "waiting", "waiting"]),
+ ("workspaced-runtime-dep", ["buildable", "buildable", "waiting", "waiting", "waiting"])
],
)
@pytest.mark.parametrize("strict", [("strict"), ("non-strict")])
def test_build_all(cli, tmpdir, datafiles, case, strict, non_workspaced_elements_state):
project = os.path.join(str(datafiles), case)
workspace = os.path.join(str(tmpdir), 'workspace')
- non_leaf_elements = ["elem2.bst", "elem3.bst", "stack.bst", "elem4.bst"]
+ non_leaf_elements = ["elem2.bst", "elem3.bst", "stack.bst", "elem4.bst", "elem5.bst"]
all_elements = ["elem1.bst", *non_leaf_elements]
# Configure strict mode
@@ -1270,8 +1270,8 @@ def test_build_all(cli, tmpdir, datafiles, case, strict, non_workspaced_elements
assert cli.get_element_states(project, all_elements) == \
dict(zip(all_elements, ['buildable', *non_workspaced_elements_state]))
- # Now build the target elem3.bst
- result = cli.run(project=project, args=['build', 'elem4.bst'])
+ # Now build the targets elem4.bst and elem5.bst
+ result = cli.run(project=project, args=['build', 'elem4.bst', 'elem5.bst'])
result.assert_success()
# Assert that the target is built
diff --git a/tests/frontend/workspaced-build-dep/elements/elem5.bst b/tests/frontend/workspaced-build-dep/elements/elem5.bst
new file mode 100644
index 000000000..4fb3af822
--- /dev/null
+++ b/tests/frontend/workspaced-build-dep/elements/elem5.bst
@@ -0,0 +1,8 @@
+kind: import
+
+build-depends:
+- elem3.bst
+
+sources:
+- kind: local
+ path: files/file4
diff --git a/tests/frontend/workspaced-runtime-dep/elements/elem5.bst b/tests/frontend/workspaced-runtime-dep/elements/elem5.bst
new file mode 100644
index 000000000..4fb3af822
--- /dev/null
+++ b/tests/frontend/workspaced-runtime-dep/elements/elem5.bst
@@ -0,0 +1,8 @@
+kind: import
+
+build-depends:
+- elem3.bst
+
+sources:
+- kind: local
+ path: files/file4