summaryrefslogtreecommitdiff
path: root/tests/internals
diff options
context:
space:
mode:
authorTristan Maat <tristan.maat@codethink.co.uk>2019-11-15 12:35:26 +0000
committerTristan Maat <tristan.maat@codethink.co.uk>2019-11-15 16:34:37 +0000
commit69ba951e1376d0f8a61552d01e18b85b97be17c6 (patch)
treebcb7f30a292298c8b39286f1f7866c0f9b1c05a6 /tests/internals
parenta686cd0680b3df7bca8b877c20c7f8a8a9d1d79b (diff)
downloadbuildstream-69ba951e1376d0f8a61552d01e18b85b97be17c6.tar.gz
cascache.py: Use a shebang that won't fail on /bin/bash-less systems
`#!/usr/bin/env bash` should generally be used instead to avoid breaking on systems that do not *have* a `/bin/bash`. This is just a test, but rather annoying on my machine.
Diffstat (limited to 'tests/internals')
-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 81273aeaf..565a6f040 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("#!/bin/bash\nexit 0")
+ dummy_buildbox_casd.write_text("#!/usr/bin/env bash\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("#!/bin/bash\nwhile :\ndo\nsleep 60\ndone")
+ dummy_buildbox_casd.write_text("#!/usr/bin/env bash\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("#!/bin/bash\ntrap 'echo hello' SIGTERM\nwhile :\ndo\nsleep 60\ndone")
+ dummy_buildbox_casd.write_text("#!/usr/bin/env bash\ntrap 'echo hello' SIGTERM\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("#!/bin/bash\necho -e hello")
+ dummy_buildbox_casd.write_text("#!/usr/bin/env bash\necho -e hello")
dummy_buildbox_casd.chmod(0o777)
monkeypatch.setenv("PATH", str(tmp_path), prepend=os.pathsep)