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

Side by Side Diff: tools/run-tests.py

Issue 285193009: Let test driver export json results. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review. Created 6 years, 7 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 | tools/testrunner/local/progress.py » ('j') | tools/testrunner/local/progress.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 result.add_option("--outdir", help="Base directory with compile output", 166 result.add_option("--outdir", help="Base directory with compile output",
167 default="out") 167 default="out")
168 result.add_option("-p", "--progress", 168 result.add_option("-p", "--progress",
169 help=("The style of progress indicator" 169 help=("The style of progress indicator"
170 " (verbose, dots, color, mono)"), 170 " (verbose, dots, color, mono)"),
171 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") 171 choices=progress.PROGRESS_INDICATORS.keys(), default="mono")
172 result.add_option("--quickcheck", default=False, action="store_true", 172 result.add_option("--quickcheck", default=False, action="store_true",
173 help=("Quick check mode (skip slow/flaky tests)")) 173 help=("Quick check mode (skip slow/flaky tests)"))
174 result.add_option("--report", help="Print a summary of the tests to be run", 174 result.add_option("--report", help="Print a summary of the tests to be run",
175 default=False, action="store_true") 175 default=False, action="store_true")
176 result.add_option("--json-test-results",
177 help="Path to a file for storing json results.")
176 result.add_option("--shard-count", 178 result.add_option("--shard-count",
177 help="Split testsuites into this number of shards", 179 help="Split testsuites into this number of shards",
178 default=1, type="int") 180 default=1, type="int")
179 result.add_option("--shard-run", 181 result.add_option("--shard-run",
180 help="Run this shard from the split up tests.", 182 help="Run this shard from the split up tests.",
181 default=1, type="int") 183 default=1, type="int")
182 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") 184 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="")
183 result.add_option("--shell-dir", help="Directory containing executables", 185 result.add_option("--shell-dir", help="Directory containing executables",
184 default="") 186 default="")
185 result.add_option("--dont-skip-slow-simulator-tests", 187 result.add_option("--dont-skip-slow-simulator-tests",
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if num_tests == 0: 463 if num_tests == 0:
462 print "No tests to run." 464 print "No tests to run."
463 return 0 465 return 0
464 466
465 # Run the tests, either locally or distributed on the network. 467 # Run the tests, either locally or distributed on the network.
466 start_time = time.time() 468 start_time = time.time()
467 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() 469 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
468 if options.junitout: 470 if options.junitout:
469 progress_indicator = progress.JUnitTestProgressIndicator( 471 progress_indicator = progress.JUnitTestProgressIndicator(
470 progress_indicator, options.junitout, options.junittestsuite) 472 progress_indicator, options.junitout, options.junittestsuite)
473 if options.json_test_results:
474 progress_indicator = progress.JsonTestProgressIndicator(
475 progress_indicator, options.json_test_results, arch, mode)
471 476
472 run_networked = not options.no_network 477 run_networked = not options.no_network
473 if not run_networked: 478 if not run_networked:
474 print("Network distribution disabled, running tests locally.") 479 print("Network distribution disabled, running tests locally.")
475 elif utils.GuessOS() != "linux": 480 elif utils.GuessOS() != "linux":
476 print("Network distribution is only supported on Linux, sorry!") 481 print("Network distribution is only supported on Linux, sorry!")
477 run_networked = False 482 run_networked = False
478 peers = [] 483 peers = []
479 if run_networked: 484 if run_networked:
480 peers = network_execution.GetPeers() 485 peers = network_execution.GetPeers()
(...skipping 16 matching lines...) Expand all
497 exit_code = runner.Run(options.j) 502 exit_code = runner.Run(options.j)
498 overall_duration = time.time() - start_time 503 overall_duration = time.time() - start_time
499 504
500 if options.time: 505 if options.time:
501 verbose.PrintTestDurations(suites, overall_duration) 506 verbose.PrintTestDurations(suites, overall_duration)
502 return exit_code 507 return exit_code
503 508
504 509
505 if __name__ == "__main__": 510 if __name__ == "__main__":
506 sys.exit(Main()) 511 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | tools/testrunner/local/progress.py » ('j') | tools/testrunner/local/progress.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698