summaryrefslogtreecommitdiff
path: root/tests/sandboxes
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sandboxes')
-rw-r--r--tests/sandboxes/missing-command.py19
-rw-r--r--tests/sandboxes/missing-command/no-runtime.bst1
-rw-r--r--tests/sandboxes/missing-command/project.conf1
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
new file mode 100644
index 000000000..8f210bcec
--- /dev/null
+++ b/tests/sandboxes/missing-command.py
@@ -0,0 +1,19 @@
+import os
+import pytest
+
+from buildstream._exceptions import ErrorDomain
+
+from tests.testutils import cli
+
+
+DATA_DIR = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)),
+ "missing-command"
+)
+
+
+@pytest.mark.datafiles(DATA_DIR)
+def test_missing_command(cli, tmpdir, datafiles):
+ project = os.path.join(datafiles.dirname, datafiles.basename)
+ result = cli.run(project=project, args=['build', 'no-runtime.bst'])
+ result.assert_task_error(ErrorDomain.SANDBOX, 'missing-command')
diff --git a/tests/sandboxes/missing-command/no-runtime.bst b/tests/sandboxes/missing-command/no-runtime.bst
new file mode 100644
index 000000000..4d7f70266
--- /dev/null
+++ b/tests/sandboxes/missing-command/no-runtime.bst
@@ -0,0 +1 @@
+kind: manual
diff --git a/tests/sandboxes/missing-command/project.conf b/tests/sandboxes/missing-command/project.conf
new file mode 100644
index 000000000..b32753625
--- /dev/null
+++ b/tests/sandboxes/missing-command/project.conf
@@ -0,0 +1 @@
+name: test