From 1f3432a33ef8379e1e52d36f6b287d9d60bda5fc Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 9 Jan 2014 09:27:50 +0100 Subject: [PATCH] validate: tools: Concider timeouts as errors when printing tests --- validate/tools/testdefinitions.py | 6 +++--- validate/tools/utils.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/validate/tools/testdefinitions.py b/validate/tools/testdefinitions.py index 3c99e902c4..adce568a5e 100644 --- a/validate/tools/testdefinitions.py +++ b/validate/tools/testdefinitions.py @@ -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 diff --git a/validate/tools/utils.py b/validate/tools/utils.py index 8ff69e1721..5b5de2f738 100644 --- a/validate/tools/utils.py +++ b/validate/tools/utils.py @@ -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: