diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-10-23 09:52:43 +0100 |
---|---|---|
committer | Darius Makovsky <traveltissues@protonmail.com> | 2019-10-30 12:35:12 +0000 |
commit | 8c999a3948704ea766aec47323d87a225364796e (patch) | |
tree | 78f32ecabf9f4e1a95900049ed411cfe905e919e /tests/integration | |
parent | 66461f42c595b67a0a704d7a4007331e92783687 (diff) | |
download | buildstream-8c999a3948704ea766aec47323d87a225364796e.tar.gz |
tests: check that workspaces only call _stage once
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/workspace.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py index 8529fc4e1..0d8a88007 100644 --- a/tests/integration/workspace.py +++ b/tests/integration/workspace.py @@ -21,6 +21,20 @@ DATA_DIR = os.path.join( @pytest.mark.datafiles(DATA_DIR) @pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') +def test_workspace_stages_once(cli, datafiles): + project = str(datafiles) + workspace = os.path.join(cli.directory, 'workspace') + element_name = 'workspace/workspace-mount.bst' + + res = cli.run(project=project, args=['workspace', 'open', '--directory', workspace, element_name]) + assert res.exit_code == 0 + assert cli.get_element_key(project, element_name) != "{:?<64}".format('') + res = cli.run(project=project, args=['build', element_name]) + assert res.exit_code == 0 + + +@pytest.mark.datafiles(DATA_DIR) +@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox') def test_workspace_mount(cli, datafiles): project = str(datafiles) workspace = os.path.join(cli.directory, 'workspace') |