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