| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 "--concurrent-recompilation-delay=500", | 74 "--concurrent-recompilation-delay=500", |
| 75 "--concurrent-recompilation"] | 75 "--concurrent-recompilation"] |
| 76 | 76 |
| 77 SUPPORTED_ARCHS = ["android_arm", | 77 SUPPORTED_ARCHS = ["android_arm", |
| 78 "android_ia32", | 78 "android_ia32", |
| 79 "arm", | 79 "arm", |
| 80 "ia32", | 80 "ia32", |
| 81 "mipsel", | 81 "mipsel", |
| 82 "nacl_ia32", | 82 "nacl_ia32", |
| 83 "nacl_x64", | 83 "nacl_x64", |
| 84 "x64", | 84 "x64"] |
| 85 "a64"] | |
| 86 # Double the timeout for these: | 85 # Double the timeout for these: |
| 87 SLOW_ARCHS = ["android_arm", | 86 SLOW_ARCHS = ["android_arm", |
| 88 "android_ia32", | 87 "android_ia32", |
| 89 "arm", | 88 "arm", |
| 90 "mipsel", | 89 "mipsel", |
| 91 "nacl_ia32", | 90 "nacl_ia32", |
| 92 "nacl_x64", | 91 "nacl_x64"] |
| 93 "a64"] | |
| 94 | 92 |
| 95 | 93 |
| 96 def BuildOptions(): | 94 def BuildOptions(): |
| 97 result = optparse.OptionParser() | 95 result = optparse.OptionParser() |
| 98 result.add_option("--arch", | 96 result.add_option("--arch", |
| 99 help=("The architecture to run tests for, " | 97 help=("The architecture to run tests for, " |
| 100 "'auto' or 'native' for auto-detect"), | 98 "'auto' or 'native' for auto-detect"), |
| 101 default="ia32,x64,arm") | 99 default="ia32,x64,arm") |
| 102 result.add_option("--arch-and-mode", | 100 result.add_option("--arch-and-mode", |
| 103 help="Architecture and mode in the format 'arch.mode'", | 101 help="Architecture and mode in the format 'arch.mode'", |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 default=False, action="store_true") | 165 default=False, action="store_true") |
| 168 result.add_option("--shard-count", | 166 result.add_option("--shard-count", |
| 169 help="Split testsuites into this number of shards", | 167 help="Split testsuites into this number of shards", |
| 170 default=1, type="int") | 168 default=1, type="int") |
| 171 result.add_option("--shard-run", | 169 result.add_option("--shard-run", |
| 172 help="Run this shard from the split up tests.", | 170 help="Run this shard from the split up tests.", |
| 173 default=1, type="int") | 171 default=1, type="int") |
| 174 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") | 172 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") |
| 175 result.add_option("--shell-dir", help="Directory containing executables", | 173 result.add_option("--shell-dir", help="Directory containing executables", |
| 176 default="") | 174 default="") |
| 177 result.add_option("--dont-skip-slow-simulator-tests", | |
| 178 help="Don't skip more slow tests when using a simulator.", | |
| 179 default=False, action="store_true", | |
| 180 dest="dont_skip_simulator_slow_tests") | |
| 181 result.add_option("--stress-only", | 175 result.add_option("--stress-only", |
| 182 help="Only run tests with --always-opt --stress-opt", | 176 help="Only run tests with --always-opt --stress-opt", |
| 183 default=False, action="store_true") | 177 default=False, action="store_true") |
| 184 result.add_option("--time", help="Print timing information after running", | 178 result.add_option("--time", help="Print timing information after running", |
| 185 default=False, action="store_true") | 179 default=False, action="store_true") |
| 186 result.add_option("-t", "--timeout", help="Timeout in seconds", | 180 result.add_option("-t", "--timeout", help="Timeout in seconds", |
| 187 default= -1, type="int") | 181 default= -1, type="int") |
| 188 result.add_option("-v", "--verbose", help="Verbose output", | 182 result.add_option("-v", "--verbose", help="Verbose output", |
| 189 default=False, action="store_true") | 183 default=False, action="store_true") |
| 190 result.add_option("--valgrind", help="Run tests through valgrind", | 184 result.add_option("--valgrind", help="Run tests through valgrind", |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 timeout = TIMEOUT_DEFAULT; | 380 timeout = TIMEOUT_DEFAULT; |
| 387 | 381 |
| 388 timeout *= TIMEOUT_SCALEFACTOR[mode] | 382 timeout *= TIMEOUT_SCALEFACTOR[mode] |
| 389 ctx = context.Context(arch, mode, shell_dir, | 383 ctx = context.Context(arch, mode, shell_dir, |
| 390 mode_flags, options.verbose, | 384 mode_flags, options.verbose, |
| 391 timeout, options.isolates, | 385 timeout, options.isolates, |
| 392 options.command_prefix, | 386 options.command_prefix, |
| 393 options.extra_flags, | 387 options.extra_flags, |
| 394 options.no_i18n) | 388 options.no_i18n) |
| 395 | 389 |
| 396 # TODO(all): Combine "simulator" and "simulator_run". | |
| 397 simulator_run = not options.dont_skip_simulator_slow_tests and \ | |
| 398 arch in ['a64', 'arm', 'mips'] and ARCH_GUESS and arch != ARCH_GUESS | |
| 399 # Find available test suites and read test cases from them. | 390 # Find available test suites and read test cases from them. |
| 400 variables = { | 391 variables = { |
| 401 "arch": arch, | 392 "arch": arch, |
| 402 "asan": options.asan, | 393 "asan": options.asan, |
| 403 "deopt_fuzzer": False, | 394 "deopt_fuzzer": False, |
| 404 "gc_stress": options.gc_stress, | 395 "gc_stress": options.gc_stress, |
| 405 "isolates": options.isolates, | 396 "isolates": options.isolates, |
| 406 "mode": mode, | 397 "mode": mode, |
| 407 "no_i18n": options.no_i18n, | 398 "no_i18n": options.no_i18n, |
| 408 "simulator_run": simulator_run, | |
| 409 "simulator": utils.UseSimulator(arch), | 399 "simulator": utils.UseSimulator(arch), |
| 410 "system": utils.GuessOS(), | 400 "system": utils.GuessOS(), |
| 411 } | 401 } |
| 412 all_tests = [] | 402 all_tests = [] |
| 413 num_tests = 0 | 403 num_tests = 0 |
| 414 test_id = 0 | 404 test_id = 0 |
| 415 for s in suites: | 405 for s in suites: |
| 416 s.ReadStatusFile(variables) | 406 s.ReadStatusFile(variables) |
| 417 s.ReadTestCases(ctx) | 407 s.ReadTestCases(ctx) |
| 418 if len(args) > 0: | 408 if len(args) > 0: |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 except KeyboardInterrupt: | 473 except KeyboardInterrupt: |
| 484 raise | 474 raise |
| 485 | 475 |
| 486 if options.time: | 476 if options.time: |
| 487 verbose.PrintTestDurations(suites, overall_duration) | 477 verbose.PrintTestDurations(suites, overall_duration) |
| 488 return exit_code | 478 return exit_code |
| 489 | 479 |
| 490 | 480 |
| 491 if __name__ == "__main__": | 481 if __name__ == "__main__": |
| 492 sys.exit(Main()) | 482 sys.exit(Main()) |
| OLD | NEW |