summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2018-09-17 14:25:08 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2018-09-18 10:12:51 +0100
commiteb3ef652ffde00d278ca32e08b964f1c30685e06 (patch)
tree7df3316590cdf9ee50e2a083e0694f9a4b87cfa4
parente2ec7c702d12aa04511287591bfb0a6aa751c31d (diff)
downloadbuildstream-richardmaw/fix-chroot-sandbox-devices.tar.gz
tests: test that integration commands can use /devrichardmaw/fix-chroot-sandbox-devices
-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