summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-11-21 08:54:58 +0100
committerJürg Billeter <j@bitron.ch>2018-11-27 13:41:09 +0000
commit223c007313b2fcb8c54e6c0183f77a3f72485c13 (patch)
tree2a7e485d06602c446a0f5e63ebea0eb1cd80eb58 /tests
parentb2ea208c427dbda4969a4922657c9cd5437c46ca (diff)
downloadbuildstream-223c007313b2fcb8c54e6c0183f77a3f72485c13.tar.gz
tests/integration/manual.py: Add test for command logging
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/manual.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index 4789d552b..c6a905ddc 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -128,3 +128,28 @@ def test_manual_element_noparallel(cli, tmpdir, datafiles):
assert text == """-j1 -Wall
2
"""
+
+
+@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.skipif(IS_LINUX and not HAVE_BWRAP, reason='Only available with bubblewrap on Linux')
+def test_manual_element_logging(cli, tmpdir, datafiles):
+ project = os.path.join(datafiles.dirname, datafiles.basename)
+ checkout = os.path.join(cli.directory, 'checkout')
+ element_path = os.path.join(project, 'elements')
+ element_name = 'import/import.bst'
+
+ create_manual_element(element_name, element_path, {
+ 'configure-commands': ["echo configure"],
+ 'build-commands': ["echo build"],
+ 'install-commands': ["echo install"],
+ 'strip-commands': ["echo strip"]
+ }, {}, {})
+
+ res = cli.run(project=project, args=['build', element_name])
+ assert res.exit_code == 0
+
+ # Verify that individual commands are logged
+ assert "echo configure" in res.stderr
+ assert "echo build" in res.stderr
+ assert "echo install" in res.stderr
+ assert "echo strip" in res.stderr