aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index ee1d412..caf4039 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -917,15 +917,17 @@ class TestHarness:
if result.res is TestResult.FAIL:
result_str += ' ' + returncode_to_status(result.returncode)
if not self.options.quiet or result.res not in ok_statuses:
- if result.res not in ok_statuses and mlog.colorize_console():
- if result.res in bad_statuses:
- self.collected_failures.append(result_str)
- decorator = mlog.red
- elif result.res is TestResult.SKIP:
- decorator = mlog.yellow
- else:
- sys.exit('Unreachable code was ... well ... reached.')
- print(decorator(result_str).get_text(True))
+ if result.res not in ok_statuses:
+ self.collected_failures.append(result_str)
+ if mlog.colorize_console():
+ if result.res in bad_statuses:
+ self.collected_failures.append(result_str)
+ decorator = mlog.red
+ elif result.res is TestResult.SKIP:
+ decorator = mlog.yellow
+ else:
+ sys.exit('Unreachable code was ... well ... reached.')
+ print(decorator(result_str).get_text(True))
else:
print(result_str)
result_str += "\n\n" + result.get_log()