diff options
author | James Ennis <james.ennis@codethink.com> | 2018-11-30 17:14:04 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-12-03 13:21:05 +0000 |
commit | d0f9c7241fc0f22bf225ebf1e34e88b1e96ec5eb (patch) | |
tree | b77a55f0f6a51407fc46a33bb1cf7769bf2a1ad5 /tests/loader/junctions.py | |
parent | 6fcfa4524a83261746718a4e3f61fb5348bb06d7 (diff) | |
download | buildstream-jonathan/fix-identical-element.tar.gz |
tests/loader/junctions.py: Test that we can build a junction that is referred differently, twice.jonathan/fix-identical-element
Test required to close #795 - We should be able to build a project which refers
to the same junction twice, but with two different filenames.
Diffstat (limited to 'tests/loader/junctions.py')
-rw-r--r-- | tests/loader/junctions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/loader/junctions.py b/tests/loader/junctions.py index a02961fb5..d55d10b3d 100644 --- a/tests/loader/junctions.py +++ b/tests/loader/junctions.py @@ -48,6 +48,16 @@ def test_simple_build(cli, tmpdir, datafiles): @pytest.mark.datafiles(DATA_DIR) +def test_build_of_same_junction_used_twice(cli, tmpdir, datafiles): + project = os.path.join(str(datafiles), 'inconsistent-names') + + # Check we can build a project that contains the same junction + # that is used twice, but named differently + result = cli.run(project=project, args=['build', 'target.bst']) + assert result.exit_code == 0 + + +@pytest.mark.datafiles(DATA_DIR) def test_nested_simple(cli, tmpdir, datafiles): foo = os.path.join(str(datafiles), 'foo') copy_subprojects(foo, datafiles, ['base']) |