diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2019-01-03 18:48:31 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2019-02-19 14:53:24 +0000 |
commit | b1a8349e40c43da20c92d0a9f137b215fb732789 (patch) | |
tree | 1adb8b03b9c1afc22c79df642a14f06b1565b819 | |
parent | 94fe346e2eab6afa620c5fc04ace3f550454a3f1 (diff) | |
download | buildstream-jonathan/workspace-fragment-multi-project.tar.gz |
test: start adding tests for multiple elements having the same workspacejonathan/workspace-fragment-multi-project
-rw-r--r-- | tests/frontend/project/elements/same-repo-bin.bst | 9 | ||||
-rw-r--r-- | tests/frontend/project/elements/same-repo-dev.bst | 9 | ||||
-rw-r--r-- | tests/frontend/workspace.py | 6 |
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/frontend/project/elements/same-repo-bin.bst b/tests/frontend/project/elements/same-repo-bin.bst new file mode 100644 index 000000000..77e1ffcb5 --- /dev/null +++ b/tests/frontend/project/elements/same-repo-bin.bst @@ -0,0 +1,9 @@ +kind: manual +variables: + command-subdir: bin-files +config: + install-commands: + - "cp %{build-root}/usr/bin/hello %{install-root}" +sources: +- kind: local + path: files diff --git a/tests/frontend/project/elements/same-repo-dev.bst b/tests/frontend/project/elements/same-repo-dev.bst new file mode 100644 index 000000000..e6b3f8716 --- /dev/null +++ b/tests/frontend/project/elements/same-repo-dev.bst @@ -0,0 +1,9 @@ +kind: manual +variables: + command-subdir: dev-files +config: + install-commands: + - "cp %{build-root}/usr/include/pony.h %{install-root}" +sources: +- kind: local + path: files diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index b992538df..10fd68c16 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -1371,3 +1371,9 @@ def test_multiple_projects(cli, datafiles, tmpdir_factory, close_from_external): # Check that the workspace no longer works result = cli.run(project=alpha_project, args=['-C', workspace_dir, 'show', '--format', '%{name}']) result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.MISSING_PROJECT_CONF) + + +@pytest.mark.datafiles(DATA_DIR) +def test_multi_element_multiple_projects(cli, datafiles, tmpdir_factory): + # Test that behaviour is consistent when two elements that use the same + # repository as a source open the same workspace |