mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Merge #17488: test: fix "bitcoind already running" warnings on macOS
1c23ea5fe6
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: ACK1c23ea5fe6
Tree-SHA512: 640f4323d4105eac5c7abb52daf80486d5d3b4a074720490ceeb97c3dd8d73a3de9a988d2550f1e2076c620bb10d452b2959d8b723d2ee64f499878909824e31
This commit is contained in:
commit
ca1eeba0b0
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue