summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Maat <tm@tlater.net>2019-12-09 16:00:14 +0000
committerTristan Maat <tm@tlater.net>2019-12-09 16:00:14 +0000
commitc39c12ec8e5ea99de56f70904408dd41c037820d (patch)
tree51ff1ab0865c0d2a979a1a1caa2dda5ffc9b89e5
parent142ada1c7ad891c2fceadd525debc7075bf0fd03 (diff)
parent6409727cf3818cb4fe9c583ad767e55636d4a727 (diff)
downloadbuildstream-c39c12ec8e5ea99de56f70904408dd41c037820d.tar.gz
Merge branch '1211-stop-using-non-posix-features-in-small-test-suite-tests-to-avoid-fake-test-failures' into 'master'
Resolve "Stop using non-POSIX features in small test suite tests to avoid fake test failures" Closes #1211 See merge request BuildStream/buildstream!1725
-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)