Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 result.add_option("-p", "--progress", | 174 result.add_option("-p", "--progress", |
| 175 help=("The style of progress indicator" | 175 help=("The style of progress indicator" |
| 176 " (verbose, dots, color, mono)"), | 176 " (verbose, dots, color, mono)"), |
| 177 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") | 177 choices=progress.PROGRESS_INDICATORS.keys(), default="mono") |
| 178 result.add_option("--quickcheck", default=False, action="store_true", | 178 result.add_option("--quickcheck", default=False, action="store_true", |
| 179 help=("Quick check mode (skip slow/flaky tests)")) | 179 help=("Quick check mode (skip slow/flaky tests)")) |
| 180 result.add_option("--report", help="Print a summary of the tests to be run", | 180 result.add_option("--report", help="Print a summary of the tests to be run", |
| 181 default=False, action="store_true") | 181 default=False, action="store_true") |
| 182 result.add_option("--json-test-results", | 182 result.add_option("--json-test-results", |
| 183 help="Path to a file for storing json results.") | 183 help="Path to a file for storing json results.") |
| 184 result.add_option("--rerun-failures-count", | |
| 185 help=("Number of times to rerun failures. Very slow tests" | |
| 186 "will be rerun only once."), | |
| 187 default=0, type="int") | |
| 188 result.add_option("--rerun-failures-max", | |
| 189 help="Maximum number of failures to rerun.", | |
|
Jakob Kummerow
2014/07/02 07:27:26
nit: for better clarity, s/failures/failing test c
Michael Achenbach
2014/07/02 08:06:33
Done.
| |
| 190 default=100, type="int") | |
| 184 result.add_option("--shard-count", | 191 result.add_option("--shard-count", |
| 185 help="Split testsuites into this number of shards", | 192 help="Split testsuites into this number of shards", |
| 186 default=1, type="int") | 193 default=1, type="int") |
| 187 result.add_option("--shard-run", | 194 result.add_option("--shard-run", |
| 188 help="Run this shard from the split up tests.", | 195 help="Run this shard from the split up tests.", |
| 189 default=1, type="int") | 196 default=1, type="int") |
| 190 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") | 197 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") |
| 191 result.add_option("--shell-dir", help="Directory containing executables", | 198 result.add_option("--shell-dir", help="Directory containing executables", |
| 192 default="") | 199 default="") |
| 193 result.add_option("--dont-skip-slow-simulator-tests", | 200 result.add_option("--dont-skip-slow-simulator-tests", |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 timeout = TIMEOUT_DEFAULT; | 416 timeout = TIMEOUT_DEFAULT; |
| 410 | 417 |
| 411 timeout *= TIMEOUT_SCALEFACTOR[mode] | 418 timeout *= TIMEOUT_SCALEFACTOR[mode] |
| 412 ctx = context.Context(arch, mode, shell_dir, | 419 ctx = context.Context(arch, mode, shell_dir, |
| 413 mode_flags, options.verbose, | 420 mode_flags, options.verbose, |
| 414 timeout, options.isolates, | 421 timeout, options.isolates, |
| 415 options.command_prefix, | 422 options.command_prefix, |
| 416 options.extra_flags, | 423 options.extra_flags, |
| 417 options.no_i18n, | 424 options.no_i18n, |
| 418 options.random_seed, | 425 options.random_seed, |
| 419 options.no_sorting) | 426 options.no_sorting, |
| 427 options.rerun_failures_count, | |
| 428 options.rerun_failures_max) | |
| 420 | 429 |
| 421 # TODO(all): Combine "simulator" and "simulator_run". | 430 # TODO(all): Combine "simulator" and "simulator_run". |
| 422 simulator_run = not options.dont_skip_simulator_slow_tests and \ | 431 simulator_run = not options.dont_skip_simulator_slow_tests and \ |
| 423 arch in ['arm64', 'arm', 'mips'] and ARCH_GUESS and arch != ARCH_GUESS | 432 arch in ['arm64', 'arm', 'mips'] and ARCH_GUESS and arch != ARCH_GUESS |
| 424 # Find available test suites and read test cases from them. | 433 # Find available test suites and read test cases from them. |
| 425 variables = { | 434 variables = { |
| 426 "arch": arch, | 435 "arch": arch, |
| 427 "asan": options.asan, | 436 "asan": options.asan, |
| 428 "deopt_fuzzer": False, | 437 "deopt_fuzzer": False, |
| 429 "gc_stress": options.gc_stress, | 438 "gc_stress": options.gc_stress, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 exit_code = runner.Run(options.j) | 516 exit_code = runner.Run(options.j) |
| 508 overall_duration = time.time() - start_time | 517 overall_duration = time.time() - start_time |
| 509 | 518 |
| 510 if options.time: | 519 if options.time: |
| 511 verbose.PrintTestDurations(suites, overall_duration) | 520 verbose.PrintTestDurations(suites, overall_duration) |
| 512 return exit_code | 521 return exit_code |
| 513 | 522 |
| 514 | 523 |
| 515 if __name__ == "__main__": | 524 if __name__ == "__main__": |
| 516 sys.exit(Main()) | 525 sys.exit(Main()) |
| OLD | NEW |