Skip to content

Commit 6b9e864

Browse files
MarcoFalkePastaPastaPasta
authored andcommitted
Merge bitcoin#10187: tests: Fix test_runner return value in case of skipped test
e96462f tests: Fix test_runner return value in case of skipped test (Wladimir J. van der Laan) Tree-SHA512: 99434ce3e0b5376268d33cdbae46d48786feb9820c7f8acccdd50f6674e315abffc84ba1feda441332d140a7480070eba732abae8f07293984d4daa9352ee8ee
1 parent 5e796e9 commit 6b9e864

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/functional/test_runner.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
318318
logging.debug("Cleaning up coverage data")
319319
coverage.cleanup()
320320

321-
all_passed = all(map(lambda test_result: test_result.status == "Passed", test_results))
321+
all_passed = all(map(lambda test_result: test_result.was_successful, test_results))
322322

323323
sys.exit(not all_passed)
324324

@@ -330,7 +330,7 @@ def print_results(test_results, max_len_name, runtime):
330330
time_sum = 0
331331

332332
for test_result in test_results:
333-
all_passed = all_passed and test_result.status != "Failed"
333+
all_passed = all_passed and test_result.was_successful
334334
time_sum += test_result.time
335335
test_result.padding = max_len_name
336336
results += str(test_result)
@@ -418,6 +418,10 @@ def __repr__(self):
418418

419419
return color[1] + "%s | %s%s | %s s\n" % (self.name.ljust(self.padding), glyph, self.status.ljust(7), self.time) + color[0]
420420

421+
@property
422+
def was_successful(self):
423+
return self.status != "Failed"
424+
421425

422426
def check_script_list(src_dir):
423427
"""Check scripts directory.

0 commit comments

Comments
 (0)