Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: tools/testrunner/local/progress.py

Issue 364793004: Add information about rerun tests to json output. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 }) 311 })
312 312
313 with open(self.json_test_results, "w") as f: 313 with open(self.json_test_results, "w") as f:
314 f.write(json.dumps(complete_results)) 314 f.write(json.dumps(complete_results))
315 315
316 def AboutToRun(self, test): 316 def AboutToRun(self, test):
317 self.progress_indicator.AboutToRun(test) 317 self.progress_indicator.AboutToRun(test)
318 318
319 def HasRun(self, test, has_unexpected_output): 319 def HasRun(self, test, has_unexpected_output):
320 self.progress_indicator.HasRun(test, has_unexpected_output) 320 self.progress_indicator.HasRun(test, has_unexpected_output)
321 if not has_unexpected_output: 321 if test.run == 1 and not has_unexpected_output:
322 # Omit tests that pass on the first run, but collect output of tests
323 # that pass when rerun.
322 return 324 return
323 self.results.append({ 325 self.results.append({
324 "name": test.GetLabel(), 326 "name": test.GetLabel(),
325 "flags": test.flags, 327 "flags": test.flags,
326 "command": EscapeCommand(self.runner.GetCommand(test)).replace( 328 "command": EscapeCommand(self.runner.GetCommand(test)).replace(
327 ABS_PATH_PREFIX, ""), 329 ABS_PATH_PREFIX, ""),
330 "run": test.run,
328 "stdout": test.output.stdout, 331 "stdout": test.output.stdout,
329 "stderr": test.output.stderr, 332 "stderr": test.output.stderr,
330 "exit_code": test.output.exit_code, 333 "exit_code": test.output.exit_code,
331 "result": "CRASH" if test.output.HasCrashed() else "FAIL", 334 "result": "CRASH" if test.output.HasCrashed() else "FAIL",
332 }) 335 })
333 336
334 337
335 PROGRESS_INDICATORS = { 338 PROGRESS_INDICATORS = {
336 'verbose': VerboseProgressIndicator, 339 'verbose': VerboseProgressIndicator,
337 'dots': DotsProgressIndicator, 340 'dots': DotsProgressIndicator,
338 'color': ColorProgressIndicator, 341 'color': ColorProgressIndicator,
339 'mono': MonochromeProgressIndicator 342 'mono': MonochromeProgressIndicator
340 } 343 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698