diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-11-21 13:49:28 +0000 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-12-02 13:35:49 +0000 |
commit | 7fb11a56f0b4d8e9a6e912f7d8a5bd0f43b70c21 (patch) | |
tree | 7692032480d1e3c3c8bcaa7cf31f7eabb701fb8e | |
parent | f9d06559c5f2f8b1c67ffff9505f644bf4edf5be (diff) | |
download | buildstream-1211-stop-using-non-posix-features-in-small-test-suite-tests-to-avoid-fake-test-failures.tar.gz |
tests/internals/cascache.py: Stop using non-posix shell features1211-stop-using-non-posix-features-in-small-test-suite-tests-to-avoid-fake-test-failures
-rw-r--r-- | tests/internals/cascache.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/internals/cascache.py b/tests/internals/cascache.py index 565a6f040..d669f2a2c 100644 --- a/tests/internals/cascache.py +++ b/tests/internals/cascache.py @@ -9,7 +9,7 @@ from buildstream._messenger import Messenger def test_report_when_cascache_dies_before_asked_to(tmp_path, monkeypatch): dummy_buildbox_casd = tmp_path.joinpath("buildbox-casd") - dummy_buildbox_casd.write_text("#!/usr/bin/env bash\nexit 0") + dummy_buildbox_casd.write_text("#!/usr/bin/env sh\nexit 0") dummy_buildbox_casd.chmod(0o777) monkeypatch.setenv("PATH", str(tmp_path), prepend=os.pathsep) @@ -28,7 +28,7 @@ def test_report_when_cascache_dies_before_asked_to(tmp_path, monkeypatch): def test_report_when_cascache_exist_not_cleanly(tmp_path, monkeypatch): dummy_buildbox_casd = tmp_path.joinpath("buildbox-casd") - dummy_buildbox_casd.write_text("#!/usr/bin/env bash\nwhile :\ndo\nsleep 60\ndone") + dummy_buildbox_casd.write_text("#!/usr/bin/env sh\nwhile :\ndo\nsleep 60\ndone") dummy_buildbox_casd.chmod(0o777) monkeypatch.setenv("PATH", str(tmp_path), prepend=os.pathsep) @@ -47,7 +47,7 @@ def test_report_when_cascache_exist_not_cleanly(tmp_path, monkeypatch): def test_report_when_cascache_is_forcefully_killed(tmp_path, monkeypatch): dummy_buildbox_casd = tmp_path.joinpath("buildbox-casd") - dummy_buildbox_casd.write_text("#!/usr/bin/env bash\ntrap 'echo hello' SIGTERM\nwhile :\ndo\nsleep 60\ndone") + dummy_buildbox_casd.write_text("#!/usr/bin/env sh\ntrap 'echo hello' TERM\nwhile :\ndo\nsleep 60\ndone") dummy_buildbox_casd.chmod(0o777) monkeypatch.setenv("PATH", str(tmp_path), prepend=os.pathsep) @@ -67,7 +67,7 @@ def test_casd_redirects_stderr_to_file_and_rotate(tmp_path, monkeypatch): n_max_log_files = 10 dummy_buildbox_casd = tmp_path.joinpath("buildbox-casd") - dummy_buildbox_casd.write_text("#!/usr/bin/env bash\necho -e hello") + dummy_buildbox_casd.write_text("#!/usr/bin/env sh\nprintf '%s\n' hello") dummy_buildbox_casd.chmod(0o777) monkeypatch.setenv("PATH", str(tmp_path), prepend=os.pathsep) |