Skip to content

Commit ca1eeba

Browse files
committed
Merge #17488: test: fix "bitcoind already running" warnings on macOS
1c23ea5 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 1c23ea5 Tree-SHA512: 640f4323d4105eac5c7abb52daf80486d5d3b4a074720490ceeb97c3dd8d73a3de9a988d2550f1e2076c620bb10d452b2959d8b723d2ee64f499878909824e31
2 parents 63fac52 + 1c23ea5 commit ca1eeba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/functional/test_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,10 @@ def main():
364364
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):
365365
args = args or []
366366

367-
# Warn if bitcoind is already running (unix only)
367+
# Warn if bitcoind is already running
368+
# pidof might fail or return an empty string if bitcoind is not running
368369
try:
369-
if subprocess.check_output(["pidof", "bitcoind"]) is not None:
370+
if subprocess.check_output(["pidof", "bitcoind"]) not in [b'']:
370371
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]))
371372
except (OSError, subprocess.SubprocessError):
372373
pass

0 commit comments

Comments
 (0)