Reviewers: Kasper Lund, Description: Output a friendly message if test fails due to time out.
Please review this at http://codereview.chromium.org/119089 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M tools/test.py Index: tools/test.py =================================================================== --- tools/test.py (revision 2099) +++ tools/test.py (working copy) @@ -67,16 +67,17 @@ self.terminate = False self.lock = threading.Lock() - def PrintFailureHeader(self, test): - if test.IsNegative(): - negative_marker = '[negative] ' - else: - negative_marker = '' - print "=== %(label)s %(negative)s===" % { - 'label': test.GetLabel(), - 'negative': negative_marker + def PrintFailureHeader(self, output): + markers = [] + if output.test.IsNegative(): + markers.append('[negative] ') + if output.output.timed_out: + markers.append('[timed out]') + print "=== %(label)s %(markers)s ===" % { + 'label': output.test.GetLabel(), + 'markers': ', '.join(markers) } - print "Path: %s" % "/".join(test.path) + print "Path: %s" % "/".join(output.test.path) def Run(self, tasks): self.Starting() @@ -154,7 +155,7 @@ def Done(self): print for failed in self.failed: - self.PrintFailureHeader(failed.test) + self.PrintFailureHeader(failed) if failed.output.stderr: print "--- stderr ---" print failed.output.stderr.strip() @@ -235,7 +236,7 @@ def HasRun(self, output): if output.UnexpectedOutput(): self.ClearLine(self.last_status_length) - self.PrintFailureHeader(output.test) + self.PrintFailureHeader(output) stdout = output.output.stdout.strip() if len(stdout): print self.templates['stdout'] % stdout --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
