Skip to content

Commit b44adf9

Browse files
author
MarcoFalke
committed
Merge #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
2 parents 67023e9 + e96462f commit b44adf9

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
@@ -293,7 +293,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal
293293
logging.debug("Cleaning up coverage data")
294294
coverage.cleanup()
295295

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

298298
sys.exit(not all_passed)
299299

@@ -305,7 +305,7 @@ def print_results(test_results, max_len_name, runtime):
305305
time_sum = 0
306306

307307
for test_result in test_results:
308-
all_passed = all_passed and test_result.status != "Failed"
308+
all_passed = all_passed and test_result.was_successful
309309
time_sum += test_result.time
310310
test_result.padding = max_len_name
311311
results += str(test_result)
@@ -393,6 +393,10 @@ def __repr__(self):
393393

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

396+
@property
397+
def was_successful(self):
398+
return self.status != "Failed"
399+
396400

397401
def check_script_list(src_dir):
398402
"""Check scripts directory.

0 commit comments

Comments
 (0)