From 1055540d55dc819a96699fce339c1e8a09f31f5f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 15 May 2018 14:35:30 -0400 Subject: [PATCH] validate:launcher: Do not print time spent if the testsuite never started --- validate/launcher/reporters.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/validate/launcher/reporters.py b/validate/launcher/reporters.py index 6fa7babf21..3a4cfe9553 100644 --- a/validate/launcher/reporters.py +++ b/validate/launcher/reporters.py @@ -98,10 +98,11 @@ class Reporter(Loggable): print("\n") lenstat = (len("Statistics") + 1) printc("Statistics:\n%s" % (lenstat * "-"), Colors.OKBLUE) - printc("\n%sTotal time spent: %s seconds\n" % - ((lenstat * " "), datetime.timedelta( - seconds=(time.time() - self._start_time))), - Colors.OKBLUE) + if self._start_time > 0: + printc("\n%sTotal time spent: %s seconds\n" % + ((lenstat * " "), datetime.timedelta( + seconds=(time.time() - self._start_time))), + Colors.OKBLUE) printc("%sPassed: %d" % (lenstat * " ", self.stats["passed"]), Colors.OKGREEN) printc("%sFailed: %d" %