diff options
Diffstat (limited to 'tests/frontend/buildcheckout.py')
-rw-r--r-- | tests/frontend/buildcheckout.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index dc3c5e4d4..5145b1222 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -9,7 +9,7 @@ import subprocess import pytest from tests.testutils.site import IS_WINDOWS -from tests.testutils import generate_junction +from tests.testutils import generate_junction, yaml_file_get_provenance from buildstream.plugintestutils import cli # pylint: disable=unused-import from buildstream import _yaml @@ -457,6 +457,11 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): result = cli.run(project=project, args=['build', 'junction-dep.bst']) result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT) + # Assert that we have the expected provenance encoded into the error + provenance = yaml_file_get_provenance( + element_path, 'junction-dep.bst', key='depends', indices=[0]) + assert str(provenance) in result.stderr + @pytest.mark.datafiles(DATA_DIR) @pytest.mark.parametrize("ref_storage", [('inline'), ('project.refs')]) |