aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_runner.py
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2022-01-28 15:17:35 +0100
committerMartin Zumsande <mzumsande@gmail.com>2022-01-28 15:46:51 +0100
commita036358994546e2041d0bf0cc911bab4e4baba3c (patch)
treef47bda5774fd1c42f540fbef9a8250a166d8d4f9 /test/functional/test_runner.py
parentd4e92d843650b0480b86d15ce46ed02b6fd9b5be (diff)
downloadbitcoin-a036358994546e2041d0bf0cc911bab4e4baba3c.tar.xz
test: Repair failfast option for test runner
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-xtest/functional/test_runner.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index e833128063..1a0d62aa8f 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -532,8 +532,11 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
max_len_name = len(max(test_list, key=len))
test_count = len(test_list)
+ all_passed = True
i = 0
while i < test_count:
+ if failfast and not all_passed:
+ break
for test_result, testdir, stdout, stderr in job_queue.get_next():
test_results.append(test_result)
i += 1
@@ -543,6 +546,7 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
elif test_result.status == "Skipped":
logging.debug("%s skipped" % (done_str))
else:
+ all_passed = False
print("%s failed, Duration: %s s\n" % (done_str, test_result.time))
print(BOLD[1] + 'stdout:\n' + BOLD[0] + stdout + '\n')
print(BOLD[1] + 'stderr:\n' + BOLD[0] + stderr + '\n')
@@ -576,7 +580,7 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
if not os.listdir(tmpdir):
os.rmdir(tmpdir)
- all_passed = all(map(lambda test_result: test_result.was_successful, test_results)) and coverage_passed
+ all_passed = all_passed and coverage_passed
# Clean up dangling processes if any. This may only happen with --failfast option.
# Killing the process group will also terminate the current process but that is