diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-02-24 19:49:03 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-02-24 19:49:03 +0900 |
commit | 60c0be146040b320d3e1c0ff8c6e2f8513a8c67b (patch) | |
tree | 97d03a1fb4e3cb76f834723aa7141337c89e5922 | |
parent | 29009193c05b1bd408f49fa3d0a7ba7bf5cefbe9 (diff) | |
download | buildstream-project-shell-customize.tar.gz |
tests/integration/shell.py: TESTING TESTING ONE TWO THREEEEEEproject-shell-customize
-rw-r--r-- | tests/integration/shell.py | 15 |
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) |