summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-08-31 15:04:56 +0300
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-08-31 15:05:53 +0300
commit4caab108812b6ecc06cbb9ecc28bb604fb585a63 (patch)
treef74fc26769f589eb0b3b3b4f37866551632e66e1
parent97c520fdcf75a4b11ea3df22f88cbc564c1c6357 (diff)
downloadbuildstream-tristan/strict-rebuild.tar.gz
tests/format/dependencies.py: Test errors when explicitly setting strict to Truetristan/strict-rebuild
-rw-r--r--tests/format/dependencies.py7
-rw-r--r--tests/format/dependencies1/elements/invalidnonstrict.bst10
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/format/dependencies.py b/tests/format/dependencies.py
index e8be68a5d..f92b89afa 100644
--- a/tests/format/dependencies.py
+++ b/tests/format/dependencies.py
@@ -58,6 +58,13 @@ def test_invalid_strict_dependency(cli, datafiles):
@pytest.mark.datafiles(DATA_DIR)
+def test_invalid_non_strict_dependency(cli, datafiles):
+ project = os.path.join(str(datafiles), 'dependencies1')
+ result = cli.run(project=project, args=['show', 'invalidnonstrict.bst'])
+ result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
+
+
+@pytest.mark.datafiles(DATA_DIR)
def test_circular_dependency(cli, datafiles):
project = os.path.join(str(datafiles), 'dependencies1')
result = cli.run(project=project, args=['show', 'circulartarget.bst'])
diff --git a/tests/format/dependencies1/elements/invalidnonstrict.bst b/tests/format/dependencies1/elements/invalidnonstrict.bst
new file mode 100644
index 000000000..3cb31a077
--- /dev/null
+++ b/tests/format/dependencies1/elements/invalidnonstrict.bst
@@ -0,0 +1,10 @@
+kind: manual
+description: |
+
+ This is an invalid non strict dependency because it is
+ currently illegal to explicitly set a dependency to be
+ non-strict (even though this is the default).
+
+depends:
+- filename: firstdep.bst
+ strict: false