adjust test_runner.py check if dashd is running

Signed-off-by: Pasta <pasta@dashboost.org>
This commit is contained in:
Pasta 2019-06-17 20:03:06 -05:00
parent 74830ee2a8
commit a651f0d0fc
No known key found for this signature in database
GPG Key ID: D362C9F7142766AE

View File

@ -228,7 +228,8 @@ def main():
def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=False, args=[]): def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=False, args=[]):
# Warn if dashd is already running (unix only) # Warn if dashd is already running (unix only)
try: try:
if subprocess.check_output(["pidof", "dashd"]) is not None: pidof_output = subprocess.check_output(["pidof", "dashd"])
if not (pidof_output is None or pidof_output == b''):
print("%sWARNING!%s There is already a dashd process running on this system. Tests may fail unexpectedly due to resource contention!" % (BOLD[1], BOLD[0])) print("%sWARNING!%s There is already a dashd process running on this system. Tests may fail unexpectedly due to resource contention!" % (BOLD[1], BOLD[0]))
except (OSError, subprocess.SubprocessError): except (OSError, subprocess.SubprocessError):
pass pass