diff options
author | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-05 19:40:26 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-08 23:50:34 +0900 |
commit | 6c0140273156a1a8457b29286342dc27bd444db7 (patch) | |
tree | cd3343bfa097c5ee65fa9cbfe3eccb9760bee34f /tests/format/link.py | |
parent | 5a2a9f4da08ff3b6f952683f970fc0f8c16e1b67 (diff) | |
download | buildstream-6c0140273156a1a8457b29286342dc27bd444db7.tar.gz |
tests/format/link.py: Testing full path link targets
* Test that we succeed to load links with full path targets
* Test that we get correct provenance information in errors when
linking to non-existing elements in existing subprojects, using
full paths.
Diffstat (limited to 'tests/format/link.py')
-rw-r--r-- | tests/format/link.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/format/link.py b/tests/format/link.py index 47e19b90c..e2c9e0b84 100644 --- a/tests/format/link.py +++ b/tests/format/link.py @@ -59,7 +59,9 @@ def test_conditional_link(cli, tmpdir, datafiles, target, greeting, expected_fil # Test links to junctions from local projects and subprojects # @pytest.mark.datafiles(DATA_DIR) -@pytest.mark.parametrize("target", ["target-local.bst", "target-nested.bst"]) +@pytest.mark.parametrize( + "target", ["target-local.bst", "target-nested.bst", "full-path-link.bst", "target-full-path.bst"] +) def test_simple_junctions(cli, tmpdir, datafiles, target): project = os.path.join(str(datafiles), "simple-junctions") checkoutdir = os.path.join(str(tmpdir), "checkout") @@ -115,6 +117,10 @@ def test_conditional_junctions(cli, tmpdir, datafiles, greeting, expected_file): ("linked-local-junction.bst", "subproject-link-notfound.bst [line 4 column 10]",), # Depends on an element via a link to a non-existing subproject junction ("linked-nested-junction.bst", "subsubproject-link-notfound.bst [line 4 column 10]",), + # Target is a link to a non-existing nested element referred to with a full path + ("link-full-path.bst", "link-full-path.bst [line 4 column 10]"), + # Target depends on a link to a non-existing nested element referred to with a full path + ("target-full-path.bst", "link-full-path.bst [line 4 column 10]"), ], ) def test_link_not_found(cli, tmpdir, datafiles, target, provenance): |