diff options
author | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-10 14:04:22 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-06-10 15:35:56 +0900 |
commit | dd7b31e2135096086275b233982092d8a26ba393 (patch) | |
tree | 646ad1acc3c8c6343cc89fef571af3505dace489 /tests | |
parent | 202107e7151a47ff112f849f57770fa62bd30ada (diff) | |
download | buildstream-dd7b31e2135096086275b233982092d8a26ba393.tar.gz |
_includes.py: Propagate provenance through Loader.get_loader()
Instead of raising a customized error message which adds little
value to the provenance, just pass the provenance along.
This is important so that the Loader is aware of the provenance
of loaded junctions, so that it can more precisely report errors
about conflicting junctions when includes cause conflicts.
This commit also adjusts tests/format/includes.py
Diffstat (limited to 'tests')
-rw-r--r-- | tests/format/include.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/format/include.py b/tests/format/include.py index 5c273e1a0..d57dd8c19 100644 --- a/tests/format/include.py +++ b/tests/format/include.py @@ -44,7 +44,7 @@ def test_include_missing_file(cli, tmpdir): result = cli.run(project=str(tmpdir), args=["show", str(element.basename)]) result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.MISSING_FILE) # Make sure the root cause provenance is in the output. - assert "line 4 column 2" in result.stderr + assert "include_missing_file.bst [line 4 column 4]" in result.stderr def test_include_dir(cli, tmpdir): @@ -68,7 +68,7 @@ def test_include_dir(cli, tmpdir): result = cli.run(project=str(tmpdir), args=["show", str(element.basename)]) result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.LOADING_DIRECTORY) # Make sure the root cause provenance is in the output. - assert "line 4 column 2" in result.stderr + assert "include_dir.bst [line 4 column 4]" in result.stderr @pytest.mark.datafiles(DATA_DIR) |