summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-08 20:02:21 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-05-08 20:41:45 +0900
commit34c3034b959ff2b839f17a7cbf998f95aca5ff58 (patch)
tree8020815ede967a23512e19baa3f5b09a5ea55498
parent000ae7beabc0f85230f760a506f5f53779aa2701 (diff)
downloadbuildstream-tristan/fix-no-strict-junctions.tar.gz
test/frontend/fetch.py: Test for crashes when loading junctions in non-strict modetristan/fix-no-strict-junctions
This is a regression test for #1018
-rw-r--r--tests/frontend/fetch.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index e330cd407..9e7a55ad9 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -79,8 +79,9 @@ def test_fetch_consistency_bug(cli, datafiles):
@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.parametrize("strict", [True, False], ids=["strict", "no-strict"])
@pytest.mark.parametrize("ref_storage", [('inline'), ('project.refs')])
-def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage):
+def test_unfetched_junction(cli, tmpdir, datafiles, strict, ref_storage):
project = str(datafiles)
subproject_path = os.path.join(project, 'files', 'sub-project')
junction_path = os.path.join(project, 'elements', 'junction.bst')
@@ -89,6 +90,13 @@ def test_unfetched_junction(cli, tmpdir, datafiles, ref_storage):
configure_project(project, {
'ref-storage': ref_storage
})
+ cli.configure({
+ 'projects': {
+ 'test': {
+ 'strict': strict
+ }
+ }
+ })
# Create a repo to hold the subproject and generate a junction element for it
ref = generate_junction(tmpdir, subproject_path, junction_path, store_ref=(ref_storage == 'inline'))