diff options
author | John Newbery <john@johnnewbery.com> | 2017-04-06 13:31:47 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-04-06 13:31:47 -0400 |
commit | bb92d839d5aecd41954091435a35e86b35a0a7ca (patch) | |
tree | cb68e1e0bb623998b16bf839c97b0fdd2527a438 /test/functional/test_runner.py | |
parent | 63062bda1ac0b57cb92e663596650a6e42508f15 (diff) |
[tests] Add unicode symbols for tests passing/failing/skipping
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-x | test/functional/test_runner.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 7cf0221826..d40ca9bbc6 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -291,7 +291,7 @@ def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=Fal sys.exit(not all_passed) 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] + 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()) all_passed = True @@ -384,7 +384,15 @@ class TestResult(): elif self.status == "Skipped": COLOR = ('\033[0m', '\033[1;30m') - return COLOR[1] + "%s | %s | %s s\n" % (self.name.ljust(self.padding), self.status.ljust(7), self.time) + COLOR[0] + SYMBOL = " " + if self.status == "Passed": + SYMBOL = "✓ " + elif self.status == "Failed": + SYMBOL = "✖ " + elif self.status == "Skipped": + SYMBOL = "○ " + + return COLOR[1] + "%s | %s%s | %s s\n" % (self.name.ljust(self.padding), SYMBOL, self.status.ljust(7), self.time) + COLOR[0] def check_script_list(src_dir): |