| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 the V8 project authors. All rights reserved. |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 def Done(self): | 215 def Done(self): |
| 216 self.PrintProgress('Done') | 216 self.PrintProgress('Done') |
| 217 | 217 |
| 218 def AboutToRun(self, case): | 218 def AboutToRun(self, case): |
| 219 self.PrintProgress(case.GetLabel()) | 219 self.PrintProgress(case.GetLabel()) |
| 220 | 220 |
| 221 def HasRun(self, output): | 221 def HasRun(self, output): |
| 222 if output.UnexpectedOutput(): | 222 if output.UnexpectedOutput(): |
| 223 self.ClearLine(self.last_status_length) | 223 self.ClearLine(self.last_status_length) |
| 224 self.PrintFailureHeader(output.test) | 224 self.PrintFailureHeader(output.test) |
| 225 print "Command: %s" % EscapeCommand(output.command) | |
| 226 stdout = output.output.stdout.strip() | 225 stdout = output.output.stdout.strip() |
| 227 if len(stdout): | 226 if len(stdout): |
| 228 print self.templates['stdout'] % stdout | 227 print self.templates['stdout'] % stdout |
| 229 stderr = output.output.stderr.strip() | 228 stderr = output.output.stderr.strip() |
| 230 if len(stderr): | 229 if len(stderr): |
| 231 print self.templates['stderr'] % stderr | 230 print self.templates['stderr'] % stderr |
| 231 print "Command: %s" % EscapeCommand(output.command) |
| 232 | 232 |
| 233 def Truncate(self, str, length): | 233 def Truncate(self, str, length): |
| 234 if length and (len(str) > (length - 3)): | 234 if length and (len(str) > (length - 3)): |
| 235 return str[:(length-3)] + "..." | 235 return str[:(length-3)] + "..." |
| 236 else: | 236 else: |
| 237 return str | 237 return str |
| 238 | 238 |
| 239 def PrintProgress(self, name): | 239 def PrintProgress(self, name): |
| 240 self.ClearLine(self.last_status_length) | 240 self.ClearLine(self.last_status_length) |
| 241 elapsed = time.time() - self.start_time | 241 elapsed = time.time() - self.start_time |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 for entry in timed_tests[:20]: | 1246 for entry in timed_tests[:20]: |
| 1247 t = FormatTime(entry.duration) | 1247 t = FormatTime(entry.duration) |
| 1248 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1248 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
| 1249 index += 1 | 1249 index += 1 |
| 1250 | 1250 |
| 1251 return result | 1251 return result |
| 1252 | 1252 |
| 1253 | 1253 |
| 1254 if __name__ == '__main__': | 1254 if __name__ == '__main__': |
| 1255 sys.exit(Main()) | 1255 sys.exit(Main()) |
| OLD | NEW |