Commit 905c4084 authored by Adrian Reber's avatar Adrian Reber Committed by Pavel Emelyanov

zdtm: print test case summary also if all test cases pass

If using the '--keep-going' option, zdtm prints out an overview how many
tests were run, failed and skipped. This would also be useful to know if
it did not fail. This patch changes the output like this:

 ################## ALL TEST(S) PASSED (TOTAL 297/SKIPPED 36) ###################

or in the case of a failure it is unchanged:

 ################### 2 TEST(S) FAILED (TOTAL 297/SKIPPED 34) ####################
  * zdtm/static/sched_policy00(ns)
  * zdtm/static/cgroup02(h)
 ##################################### FAIL #####################################
Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3edd0576
...@@ -1481,12 +1481,18 @@ class launcher: ...@@ -1481,12 +1481,18 @@ class launcher:
self.__fail = True self.__fail = True
if self.__file_report: if self.__file_report:
self.__file_report.close() self.__file_report.close()
if self.__fail:
if opts['keep_going']: if opts['keep_going']:
if self.__fail:
print_sep("%d TEST(S) FAILED (TOTAL %d/SKIPPED %d)" print_sep("%d TEST(S) FAILED (TOTAL %d/SKIPPED %d)"
% (len(self.__failed), self.__total, self.__nr_skip), "#") % (len(self.__failed), self.__total, self.__nr_skip), "#")
for failed in self.__failed: for failed in self.__failed:
print " * %s(%s)" % (failed[0], failed[1]) print " * %s(%s)" % (failed[0], failed[1])
else:
print_sep("ALL TEST(S) PASSED (TOTAL %d/SKIPPED %d)"
% (self.__total, self.__nr_skip), "#")
if self.__fail:
print_sep("FAIL", "#") print_sep("FAIL", "#")
sys.exit(1) sys.exit(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment