mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
test: List any failed tests at the end of test_runner output
Change sorting output to put failed tests at the end of test_runner output.
This commit is contained in:
parent
f92541f7ea
commit
ffb033a6d5
1 changed files with 9 additions and 1 deletions
|
@ -367,7 +367,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_cove
|
|||
def print_results(test_results, max_len_name, runtime):
|
||||
results = "\n" + BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "STATUS ", "DURATION") + BOLD[0]
|
||||
|
||||
test_results.sort(key=lambda result: result.name.lower())
|
||||
test_results.sort(key=TestResult.sort_key)
|
||||
all_passed = True
|
||||
time_sum = 0
|
||||
|
||||
|
@ -459,6 +459,14 @@ class TestResult():
|
|||
self.time = time
|
||||
self.padding = 0
|
||||
|
||||
def sort_key(self):
|
||||
if self.status == "Passed":
|
||||
return 0, self.name.lower()
|
||||
elif self.status == "Failed":
|
||||
return 2, self.name.lower()
|
||||
elif self.status == "Skipped":
|
||||
return 1, self.name.lower()
|
||||
|
||||
def __repr__(self):
|
||||
if self.status == "Passed":
|
||||
color = BLUE
|
||||
|
|
Loading…
Reference in a new issue