mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 10:23:32 +01:00
os.CmdTestOs: Beautify test summary
Log a greppable summary of all failed tests in one line at the end of the output. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
86a6939688
commit
50abdbb3c7
1 changed files with 4 additions and 3 deletions
|
|
@ -127,10 +127,11 @@ class CmdTestOs(MachineCmd): # export
|
|||
conn.instance = None
|
||||
del machine
|
||||
self.__results.dump(env.args)
|
||||
n_failed = self.__results.n_failed()
|
||||
if (n_failed):
|
||||
slog(ERR, "%d test%s failed" % (n_failed, "" if n_failed == 1 else "s"))
|
||||
if self.__results.n_failed > 0:
|
||||
slog(ERR, "{} out of {} tests failed: {}".format(
|
||||
self.__results.n_failed, self.__results.n_total, ', '.join(self.__results.failed)))
|
||||
return -1
|
||||
slog(NOTICE, "All {} tests passed".format(self.__results.n_total))
|
||||
return 0
|
||||
|
||||
def add_parser(self, parsers):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue