summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2018-09-17 14:25:08 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-09-18 13:22:38 +0000
commit8430fdc7da59a20d6a3ec9b526d681b8f68920ec (patch)
tree26df4d2164f0150097a01356975e3459e895c8d4
parentd042560842ce504bb57605b1388ccc7daaa16c66 (diff)
downloadbuildstream-8430fdc7da59a20d6a3ec9b526d681b8f68920ec.tar.gz
tests: test that integration commands can use /dev
-rw-r--r--tests/integration/project/elements/integration.bst9
-rw-r--r--tests/integration/shell.py10
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/integration/project/elements/integration.bst b/tests/integration/project/elements/integration.bst
new file mode 100644
index 000000000..be21ae31b
--- /dev/null
+++ b/tests/integration/project/elements/integration.bst
@@ -0,0 +1,9 @@
+kind: manual
+depends:
+- base.bst
+
+public:
+ bst:
+ integration-commands:
+ - |
+ echo noise >/dev/null
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index 18953aa2d..947650ff1 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -342,3 +342,13 @@ def test_sysroot_workspace_visible(cli, tmpdir, datafiles):
])
assert result.exit_code == 0
assert result.output == workspace_hello
+
+
+# Test system integration commands can access devices in /dev
+@pytest.mark.datafiles(DATA_DIR)
+def test_integration_devices(cli, tmpdir, datafiles):
+ project = os.path.join(datafiles.dirname, datafiles.basename)
+ element_name = 'integration.bst'
+
+ result = execute_shell(cli, project, ["true"], element=element_name)
+ assert result.exit_code == 0