Skip to content
Permalink
Browse files

sanitycheck: Add progress to verbose mode

In verbose mode (-v) progress of running test cases number out of total
number is not printed. Thus, if there are many test cases, it is
impossible to follow the progress. This commit adds printing of current
test case and total numbers to the verbose output.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
  • Loading branch information...
rmstoi authored and nashif committed May 29, 2018
1 parent edb2ad1 commit 33fa63e40ec9550cda2d899996accf9163a4e770
Showing with 11 additions and 1 deletion.
  1. +11 −1 scripts/sanitycheck
@@ -2606,14 +2606,24 @@ def chatty_test_cb(instances, goals, goal):
if VERBOSE < 2 and not goal.finished:
return

total_tests = len(goals)
total_tests_width = len(str(total_tests))
total_done = 0

for k, g in goals.items():
if g.finished:
total_done += 1

if goal.failed:
status = COLOR_RED + "FAILED" + COLOR_NORMAL + ": " + goal.reason
elif goal.finished:
status = COLOR_GREEN + "PASSED" + COLOR_NORMAL
else:
status = goal.make_state

info("{:<25} {:<50} {}".format(i.platform.name, i.test.name, status))
info("{:>{}}/{} {:<25} {:<50} {}".format(
total_done, total_tests_width, total_tests, i.platform.name,
i.test.name, status))
if goal.failed:
log_info(goal.get_error_log())

0 comments on commit 33fa63e

Please sign in to comment.
You can’t perform that action at this time.