| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 from testrunner.objects import context | 48 from testrunner.objects import context |
| 49 | 49 |
| 50 | 50 |
| 51 ARCH_GUESS = utils.DefaultArch() | 51 ARCH_GUESS = utils.DefaultArch() |
| 52 DEFAULT_TESTS = ["mjsunit", "webkit"] | 52 DEFAULT_TESTS = ["mjsunit", "webkit"] |
| 53 TIMEOUT_DEFAULT = 60 | 53 TIMEOUT_DEFAULT = 60 |
| 54 TIMEOUT_SCALEFACTOR = {"debug" : 4, | 54 TIMEOUT_SCALEFACTOR = {"debug" : 4, |
| 55 "release" : 1 } | 55 "release" : 1 } |
| 56 | 56 |
| 57 MODE_FLAGS = { | 57 MODE_FLAGS = { |
| 58 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination", | 58 "debug" : ["--nohard-abort", "--nodead-code-elimination", |
| 59 "--nofold-constants", "--enable-slow-asserts", | 59 "--nofold-constants", "--enable-slow-asserts", |
| 60 "--debug-code", "--verify-heap", | 60 "--debug-code", "--verify-heap", |
| 61 "--noconcurrent-recompilation"], | 61 "--noconcurrent-recompilation"], |
| 62 "release" : ["--nobreak-on-abort", "--nodead-code-elimination", | 62 "release" : ["--nohard-abort", "--nodead-code-elimination", |
| 63 "--nofold-constants", "--noconcurrent-recompilation"]} | 63 "--nofold-constants", "--noconcurrent-recompilation"]} |
| 64 | 64 |
| 65 SUPPORTED_ARCHS = ["android_arm", | 65 SUPPORTED_ARCHS = ["android_arm", |
| 66 "android_ia32", | 66 "android_ia32", |
| 67 "arm", | 67 "arm", |
| 68 "ia32", | 68 "ia32", |
| 69 "mipsel", | 69 "mipsel", |
| 70 "nacl_ia32", | 70 "nacl_ia32", |
| 71 "nacl_x64", | 71 "nacl_x64", |
| 72 "x64"] | 72 "x64"] |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 def BuildOptions(): | 148 def BuildOptions(): |
| 149 result = optparse.OptionParser() | 149 result = optparse.OptionParser() |
| 150 result.add_option("--arch", | 150 result.add_option("--arch", |
| 151 help=("The architecture to run tests for, " | 151 help=("The architecture to run tests for, " |
| 152 "'auto' or 'native' for auto-detect"), | 152 "'auto' or 'native' for auto-detect"), |
| 153 default="ia32,x64,arm") | 153 default="ia32,x64,arm") |
| 154 result.add_option("--arch-and-mode", | 154 result.add_option("--arch-and-mode", |
| 155 help="Architecture and mode in the format 'arch.mode'", | 155 help="Architecture and mode in the format 'arch.mode'", |
| 156 default=None) | 156 default=None) |
| 157 result.add_option("--asan", |
| 158 help="Regard test expectations for ASAN", |
| 159 default=False, action="store_true") |
| 157 result.add_option("--buildbot", | 160 result.add_option("--buildbot", |
| 158 help="Adapt to path structure used on buildbots", | 161 help="Adapt to path structure used on buildbots", |
| 159 default=False, action="store_true") | 162 default=False, action="store_true") |
| 160 result.add_option("--command-prefix", | 163 result.add_option("--command-prefix", |
| 161 help="Prepended to each shell command used to run a test", | 164 help="Prepended to each shell command used to run a test", |
| 162 default="") | 165 default="") |
| 163 result.add_option("--coverage", help=("Exponential test coverage " | 166 result.add_option("--coverage", help=("Exponential test coverage " |
| 164 "(range 0.0, 1.0) -- 0.0: one test, 1.0 all tests (slow)"), | 167 "(range 0.0, 1.0) -- 0.0: one test, 1.0 all tests (slow)"), |
| 165 default=0.4, type="float") | 168 default=0.4, type="float") |
| 166 result.add_option("--coverage-lift", help=("Lifts test coverage for tests " | 169 result.add_option("--coverage-lift", help=("Lifts test coverage for tests " |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 timeout *= TIMEOUT_SCALEFACTOR[mode] | 359 timeout *= TIMEOUT_SCALEFACTOR[mode] |
| 357 ctx = context.Context(arch, mode, shell_dir, | 360 ctx = context.Context(arch, mode, shell_dir, |
| 358 mode_flags, options.verbose, | 361 mode_flags, options.verbose, |
| 359 timeout, options.isolates, | 362 timeout, options.isolates, |
| 360 options.command_prefix, | 363 options.command_prefix, |
| 361 options.extra_flags, | 364 options.extra_flags, |
| 362 False) | 365 False) |
| 363 | 366 |
| 364 # Find available test suites and read test cases from them. | 367 # Find available test suites and read test cases from them. |
| 365 variables = { | 368 variables = { |
| 369 "arch": arch, |
| 370 "asan": options.asan, |
| 371 "deopt_fuzzer": True, |
| 372 "gc_stress": False, |
| 373 "isolates": options.isolates, |
| 366 "mode": mode, | 374 "mode": mode, |
| 367 "arch": arch, | 375 "no_i18n": False, |
| 376 "simulator": utils.UseSimulator(arch), |
| 368 "system": utils.GuessOS(), | 377 "system": utils.GuessOS(), |
| 369 "isolates": options.isolates, | |
| 370 "deopt_fuzzer": True, | |
| 371 "no_i18n": False, | |
| 372 } | 378 } |
| 373 all_tests = [] | 379 all_tests = [] |
| 374 num_tests = 0 | 380 num_tests = 0 |
| 375 test_id = 0 | 381 test_id = 0 |
| 376 | 382 |
| 377 # Remember test case prototypes for the fuzzing phase. | 383 # Remember test case prototypes for the fuzzing phase. |
| 378 test_backup = dict((s, []) for s in suites) | 384 test_backup = dict((s, []) for s in suites) |
| 379 | 385 |
| 380 for s in suites: | 386 for s in suites: |
| 381 s.ReadStatusFile(variables) | 387 s.ReadStatusFile(variables) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return exit_code | 466 return exit_code |
| 461 | 467 |
| 462 except KeyboardInterrupt: | 468 except KeyboardInterrupt: |
| 463 return 1 | 469 return 1 |
| 464 | 470 |
| 465 return exit_code | 471 return exit_code |
| 466 | 472 |
| 467 | 473 |
| 468 if __name__ == "__main__": | 474 if __name__ == "__main__": |
| 469 sys.exit(Main()) | 475 sys.exit(Main()) |
| OLD | NEW |