summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-02-24 19:49:03 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-02-24 19:49:03 +0900
commit60c0be146040b320d3e1c0ff8c6e2f8513a8c67b (patch)
tree97d03a1fb4e3cb76f834723aa7141337c89e5922
parent29009193c05b1bd408f49fa3d0a7ba7bf5cefbe9 (diff)
downloadbuildstream-project-shell-customize.tar.gz
tests/integration/shell.py: TESTING TESTING ONE TWO THREEEEEEproject-shell-customize
-rw-r--r--tests/integration/shell.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index 341ad7e3d..3b42e4ea0 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -75,6 +75,21 @@ def test_inherit(cli, tmpdir, datafiles, animal):
assert result.output == expected
+# Test host environment variable inheritance
+@pytest.mark.parametrize("animal", [("Horse"), ("Pony")])
+@pytest.mark.datafiles(DATA_DIR)
+def test_inherit_again(cli, tmpdir, datafiles, animal):
+ project = os.path.join(datafiles.dirname, datafiles.basename)
+
+ # Set the env var, and expect the same with added newline
+ os.environ['ANIMAL'] = animal
+ expected = animal + '\n'
+
+ result = execute_shell(cli, project, ['echo', '${ANIMAL}'])
+ assert result.exit_code == 0
+ assert result.output == expected
+
+
# Test running an executable in a runtime with no shell (i.e., no
# /bin/sh)
@pytest.mark.datafiles(DATA_DIR)