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

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

Issue 1276853002: [test] Return variant and random seed on failures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « tools/run-tests.py ('k') | tools/testrunner/objects/testcase.py » ('j') | 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if test.output.HasTimedOut(): 306 if test.output.HasTimedOut():
307 fail_text += "--- TIMEOUT ---" 307 fail_text += "--- TIMEOUT ---"
308 self.outputter.HasRunTest( 308 self.outputter.HasRunTest(
309 [test.GetLabel()] + self.runner.context.mode_flags + test.flags, 309 [test.GetLabel()] + self.runner.context.mode_flags + test.flags,
310 test.duration, 310 test.duration,
311 fail_text) 311 fail_text)
312 312
313 313
314 class JsonTestProgressIndicator(ProgressIndicator): 314 class JsonTestProgressIndicator(ProgressIndicator):
315 315
316 def __init__(self, json_test_results, arch, mode): 316 def __init__(self, json_test_results, arch, mode, random_seed):
317 self.json_test_results = json_test_results 317 self.json_test_results = json_test_results
318 self.arch = arch 318 self.arch = arch
319 self.mode = mode 319 self.mode = mode
320 self.random_seed = random_seed
320 self.results = [] 321 self.results = []
321 self.tests = [] 322 self.tests = []
322 323
323 def Done(self): 324 def Done(self):
324 complete_results = [] 325 complete_results = []
325 if os.path.exists(self.json_test_results): 326 if os.path.exists(self.json_test_results):
326 with open(self.json_test_results, "r") as f: 327 with open(self.json_test_results, "r") as f:
327 # Buildbot might start out with an empty file. 328 # Buildbot might start out with an empty file.
328 complete_results = json.loads(f.read() or "[]") 329 complete_results = json.loads(f.read() or "[]")
329 330
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 "flags": test.flags, 364 "flags": test.flags,
364 "command": EscapeCommand(self.runner.GetCommand(test)).replace( 365 "command": EscapeCommand(self.runner.GetCommand(test)).replace(
365 ABS_PATH_PREFIX, ""), 366 ABS_PATH_PREFIX, ""),
366 "run": test.run, 367 "run": test.run,
367 "stdout": test.output.stdout, 368 "stdout": test.output.stdout,
368 "stderr": test.output.stderr, 369 "stderr": test.output.stderr,
369 "exit_code": test.output.exit_code, 370 "exit_code": test.output.exit_code,
370 "result": test.suite.GetOutcome(test), 371 "result": test.suite.GetOutcome(test),
371 "expected": list(test.outcomes or ["PASS"]), 372 "expected": list(test.outcomes or ["PASS"]),
372 "duration": test.duration, 373 "duration": test.duration,
374
375 # TODO(machenbach): This stores only the global random seed from the
376 # context and not possible overrides when using random-seed stress.
377 "random_seed": self.random_seed,
378 "variant": test.variant,
373 }) 379 })
374 380
375 381
376 PROGRESS_INDICATORS = { 382 PROGRESS_INDICATORS = {
377 'verbose': VerboseProgressIndicator, 383 'verbose': VerboseProgressIndicator,
378 'dots': DotsProgressIndicator, 384 'dots': DotsProgressIndicator,
379 'color': ColorProgressIndicator, 385 'color': ColorProgressIndicator,
380 'mono': MonochromeProgressIndicator 386 'mono': MonochromeProgressIndicator
381 } 387 }
OLDNEW
« no previous file with comments | « tools/run-tests.py ('k') | tools/testrunner/objects/testcase.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698