validate: tools: Concider timeouts as errors when printing tests

This commit is contained in:
Thibault Saunier 2014-01-09 09:27:50 +01:00
parent dac5b38a4d
commit 1f3432a33e
2 changed files with 5 additions and 3 deletions

View file

@ -59,9 +59,9 @@ class Test(Loggable):
string = self.classname
if self.result != Result.NOT_RUN:
string += ": " + self.result
if self.result == Result.FAILED:
string += "'%s'\n You can reproduce with: %s" \
% (self.message, self.command)
if self.result in [Result.FAILED, Result.TIMEOUT]:
string += " '%s'\n You can reproduce with: %s" \
% (self.message, self.command)
return string

View file

@ -64,6 +64,8 @@ def printc (message, color="", title=False):
if hasattr(message, "result") and color == '':
if message.result == Result.FAILED:
color = Colors.FAIL
elif message.result == Result.TIMEOUT:
color = Colors.WARNING
elif message.result == Result.PASSED:
color = Colors.OKGREEN
else: