aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-11-18 14:23:33 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-11-18 14:23:41 +0100
commitca1eeba0b0586fba9df9d179eb3884eb7f74f919 (patch)
treeab024de3b71042876cb47c7125a1c3cfd2752bf4 /test
parent63fac52f31ea37e5c71a64198c76484bc87dc11d (diff)
parent1c23ea5fe67b88fd72a1ff640dd1bbb21a34fbf4 (diff)
downloadbitcoin-ca1eeba0b0586fba9df9d179eb3884eb7f74f919.tar.xz
Merge #17488: test: fix "bitcoind already running" warnings on macOS
1c23ea5fe67b88fd72a1ff640dd1bbb21a34fbf4 test: fix bitcoind already running warnings on macOS (fanquake) Pull request description: On macOS, `pidof` installed via brew returns b'' rather than None. Account for this, to remove spurious warnings from the test_runner. ACKs for top commit: laanwj: ACK 1c23ea5fe67b88fd72a1ff640dd1bbb21a34fbf4 Tree-SHA512: 640f4323d4105eac5c7abb52daf80486d5d3b4a074720490ceeb97c3dd8d73a3de9a988d2550f1e2076c620bb10d452b2959d8b723d2ee64f499878909824e31
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/test_runner.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 9b4a5d2030..4156e22720 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -364,9 +364,10 @@ def main():
def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, runs_ci, use_term_control):
args = args or []
- # Warn if bitcoind is already running (unix only)
+ # Warn if bitcoind is already running
+ # pidof might fail or return an empty string if bitcoind is not running
try:
- if subprocess.check_output(["pidof", "bitcoind"]) is not None:
+ if subprocess.check_output(["pidof", "bitcoind"]) not in [b'']:
print("%sWARNING!%s There is already a bitcoind process running on this system. Tests may fail unexpectedly due to resource contention!" % (BOLD[1], BOLD[0]))
except (OSError, subprocess.SubprocessError):
pass