summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-10-23 09:52:43 +0100
committerDarius Makovsky <traveltissues@protonmail.com>2019-10-30 12:35:12 +0000
commit8c999a3948704ea766aec47323d87a225364796e (patch)
tree78f32ecabf9f4e1a95900049ed411cfe905e919e /tests/integration
parent66461f42c595b67a0a704d7a4007331e92783687 (diff)
downloadbuildstream-8c999a3948704ea766aec47323d87a225364796e.tar.gz
tests: check that workspaces only call _stage once
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/workspace.py14
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')