diff options
author | Valentin David <valentin.david@codethink.co.uk> | 2018-08-08 11:40:28 +0200 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-08-13 09:29:40 +0000 |
commit | 353a6cc28b6406ce202684a554ee58a1222fb9db (patch) | |
tree | 5a45fa20e017d4376a24c72855b2c55c1c48810a /tests/frontend | |
parent | a791e09c9ec439516e44ecbb27574fc078649e3c (diff) | |
download | buildstream-353a6cc28b6406ce202684a554ee58a1222fb9db.tar.gz |
Fix tracking of junctions used in project.conf.
Stream._load() now returns early without resolving build pipeline when
only tracking. Resolving track pipelines does not require to fully
load project configurations when when elements to track are only
junctions.
However build pipelines require to fully load project
configurations. This might not be possible in the case a project
configuration includes a file from a junction that yet needs to be
tracked.
Fixes #565.
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/track.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/frontend/track.py b/tests/frontend/track.py index 1cf962f88..73b63ec4c 100644 --- a/tests/frontend/track.py +++ b/tests/frontend/track.py @@ -612,3 +612,25 @@ def test_track_include_junction(cli, tmpdir, datafiles, ref_storage, kind): # Assert that we are now buildable because the source is # now cached. assert cli.get_element_state(project, element_name) == 'buildable' + + +@pytest.mark.datafiles(DATA_DIR) +@pytest.mark.parametrize("ref_storage", [('inline'), ('project.refs')]) +@pytest.mark.parametrize("kind", [(kind) for kind in ALL_REPO_KINDS]) +def test_track_junction_included(cli, tmpdir, datafiles, ref_storage, kind): + project = os.path.join(datafiles.dirname, datafiles.basename) + element_path = os.path.join(project, 'elements') + subproject_path = os.path.join(project, 'files', 'sub-project') + sub_element_path = os.path.join(subproject_path, 'elements') + junction_path = os.path.join(element_path, 'junction.bst') + + configure_project(project, { + 'ref-storage': ref_storage, + '(@)': ['junction.bst:test.yml'] + }) + + generate_junction(str(tmpdir.join('junction_repo')), + subproject_path, junction_path, store_ref=False) + + result = cli.run(project=project, args=['track', 'junction.bst']) + result.assert_success() |