summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/frontend/project/elements/same-repo-bin.bst9
-rw-r--r--tests/frontend/project/elements/same-repo-dev.bst9
-rw-r--r--tests/frontend/workspace.py6
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