Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | def main(): | ||||
run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], | run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], | ||||
config["environment"]["EXEEXT"], tmpdir, args.jobs, args.coverage, passon_args) | config["environment"]["EXEEXT"], tmpdir, args.jobs, args.coverage, passon_args) | ||||
def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_coverage=False, args=[]): | def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_coverage=False, args=[]): | ||||
# Warn if bitcoind is already running (unix only) | # Warn if bitcoind is already running (unix only) | ||||
try: | try: | ||||
if subprocess.check_output(["pidof", "bitcoind"]) is not None: | pidofOutput = subprocess.check_output(["pidof", "bitcoind"]) | ||||
if pidofOutput is not None and pidofOutput != b'': | |||||
print("%sWARNING!%s There is already a bitcoind process running on this system. Tests may fail unexpectedly due to resource contention!" % ( | 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])) | BOLD[1], BOLD[0])) | ||||
except (OSError, subprocess.SubprocessError): | except (OSError, subprocess.SubprocessError): | ||||
pass | pass | ||||
# Warn if there is a cache directory | # Warn if there is a cache directory | ||||
cache_dir = "%s/test/cache" % build_dir | cache_dir = "%s/test/cache" % build_dir | ||||
if os.path.isdir(cache_dir): | if os.path.isdir(cache_dir): | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |