You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:24:29 UTC
[buildstream] 14/14: fixup! fixup! fixup! fixup! fixup! fixup!
fixup! fixup! fixup! fixup! fixup! tests: Remove build dependencies from
stack elements
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch chandan/stack-stricter-warnings
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 4c55e8ead3dc481acd5b781bc41a799b4b58616f
Author: Chandan Singh <ch...@chandansingh.net>
AuthorDate: Tue Jul 16 20:20:54 2019 +0100
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! tests: Remove build dependencies from stack elements
---
.../project/elements/target-push-pull-no-strict.bst | 10 ++++++++++
tests/frontend/pull.py | 13 +++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/tests/frontend/project/elements/target-push-pull-no-strict.bst b/tests/frontend/project/elements/target-push-pull-no-strict.bst
new file mode 100644
index 0000000..4d3da82
--- /dev/null
+++ b/tests/frontend/project/elements/target-push-pull-no-strict.bst
@@ -0,0 +1,10 @@
+kind: script
+description: |
+
+ Main target for tests/frontend/pull.py::test_push_pull_non_strict().
+ We do not use target.bst as we want an element kind that supports
+ build dependencies.
+
+build-depends:
+- import-bin.bst
+- compose-all.bst
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index a87a311..fc64884 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -216,6 +216,7 @@ def test_push_pull_specific_remote(cli, tmpdir, datafiles):
@pytest.mark.datafiles(DATA_DIR)
def test_push_pull_non_strict(cli, tmpdir, datafiles):
project = str(datafiles)
+ target = "target-push-pull-no-strict.bst"
with create_artifact_share(os.path.join(str(tmpdir), 'artifactshare')) as share:
# First build the target element and push to the remote.
@@ -225,12 +226,12 @@ def test_push_pull_non_strict(cli, tmpdir, datafiles):
'test': {'strict': False}
}
})
- result = cli.run(project=project, args=['build', 'target.bst'])
+ result = cli.run(project=project, args=['build', target])
result.assert_success()
- assert cli.get_element_state(project, 'target.bst') == 'cached'
+ assert cli.get_element_state(project, target) == 'cached'
# Assert that everything is now cached in the remote.
- all_elements = ['target.bst', 'import-bin.bst', 'import-dev.bst', 'compose-all.bst']
+ all_elements = [target, 'import-bin.bst', 'import-dev.bst', 'compose-all.bst']
for element_name in all_elements:
assert_shared(cli, share, project, element_name)
@@ -253,14 +254,14 @@ def test_push_pull_non_strict(cli, tmpdir, datafiles):
# Assert that the workspaced element requires a rebuild
assert cli.get_element_state(project, 'import-bin.bst') == 'buildable'
# Assert that the target is still waiting due to --no-strict
- assert cli.get_element_state(project, 'target.bst') == 'waiting'
+ assert cli.get_element_state(project, target) == 'waiting'
# Now try bst artifact pull
- result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst'])
+ result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', target])
result.assert_success()
# And assert that the target is again in the local cache, without having built
- assert cli.get_element_state(project, 'target.bst') == 'cached'
+ assert cli.get_element_state(project, target) == 'cached'
# Regression test for https://gitlab.com/BuildStream/buildstream/issues/202