summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2019-11-21 13:49:28 +0000
committerTristan Maat <tristan.maat@codethink.co.uk>2019-12-09 15:02:20 +0000
commit6409727cf3818cb4fe9c583ad767e55636d4a727 (patch)
tree51ff1ab0865c0d2a979a1a1caa2dda5ffc9b89e5
parent142ada1c7ad891c2fceadd525debc7075bf0fd03 (diff)
downloadbuildstream-6409727cf3818cb4fe9c583ad767e55636d4a727.tar.gz
tests/internals/cascache.py: Stop using non-posix shell features
-rw-r--r--tests/internals/cascache.py8
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)