| 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 29 matching lines...) Expand all Loading... |
| 40 from testrunner.local import execution | 40 from testrunner.local import execution |
| 41 from testrunner.local import progress | 41 from testrunner.local import progress |
| 42 from testrunner.local import testsuite | 42 from testrunner.local import testsuite |
| 43 from testrunner.local import utils | 43 from testrunner.local import utils |
| 44 from testrunner.local import verbose | 44 from testrunner.local import verbose |
| 45 from testrunner.network import network_execution | 45 from testrunner.network import network_execution |
| 46 from testrunner.objects import context | 46 from testrunner.objects import context |
| 47 | 47 |
| 48 | 48 |
| 49 ARCH_GUESS = utils.DefaultArch() | 49 ARCH_GUESS = utils.DefaultArch() |
| 50 DEFAULT_TESTS = ["mjsunit", "cctest", "message", "preparser"] | 50 DEFAULT_TESTS = ["lexer"] |
| 51 TIMEOUT_DEFAULT = 60 | 51 TIMEOUT_DEFAULT = 60 |
| 52 TIMEOUT_SCALEFACTOR = {"debug" : 4, | 52 TIMEOUT_SCALEFACTOR = {"debug" : 4, |
| 53 "release" : 1 } | 53 "release" : 1 } |
| 54 | 54 |
| 55 # Use this to run several variants of the tests. | 55 # Use this to run several variants of the tests. |
| 56 VARIANT_FLAGS = [[], | 56 VARIANT_FLAGS = [[]] |
| 57 ["--stress-opt", "--always-opt"], | |
| 58 ["--nocrankshaft"]] | |
| 59 MODE_FLAGS = { | 57 MODE_FLAGS = { |
| 60 "debug" : ["--nobreak-on-abort", "--nodead-code-elimination", | 58 "debug" : [], |
| 61 "--nofold-constants", "--enable-slow-asserts", | 59 "release" : []} |
| 62 "--debug-code", "--verify-heap"], | |
| 63 "release" : ["--nobreak-on-abort", "--nodead-code-elimination", | |
| 64 "--nofold-constants"]} | |
| 65 | 60 |
| 66 SUPPORTED_ARCHS = ["android_arm", | 61 SUPPORTED_ARCHS = ["android_arm", |
| 67 "android_ia32", | 62 "android_ia32", |
| 68 "arm", | 63 "arm", |
| 69 "ia32", | 64 "ia32", |
| 70 "mipsel", | 65 "mipsel", |
| 71 "nacl_ia32", | 66 "nacl_ia32", |
| 72 "nacl_x64", | 67 "nacl_x64", |
| 73 "x64"] | 68 "x64"] |
| 74 # Double the timeout for these: | 69 # Double the timeout for these: |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 if options.stress_only: | 214 if options.stress_only: |
| 220 VARIANT_FLAGS = [["--stress-opt", "--always-opt"]] | 215 VARIANT_FLAGS = [["--stress-opt", "--always-opt"]] |
| 221 if options.valgrind: | 216 if options.valgrind: |
| 222 run_valgrind = os.path.join("tools", "run-valgrind.py") | 217 run_valgrind = os.path.join("tools", "run-valgrind.py") |
| 223 # This is OK for distributed running, so we don't need to set no_network. | 218 # This is OK for distributed running, so we don't need to set no_network. |
| 224 options.command_prefix = (["python", "-u", run_valgrind] + | 219 options.command_prefix = (["python", "-u", run_valgrind] + |
| 225 options.command_prefix) | 220 options.command_prefix) |
| 226 if not options.flaky_tests in ["run", "skip", "dontcare"]: | 221 if not options.flaky_tests in ["run", "skip", "dontcare"]: |
| 227 print "Unknown flaky test mode %s" % options.flaky_tests | 222 print "Unknown flaky test mode %s" % options.flaky_tests |
| 228 return False | 223 return False |
| 229 if not options.no_i18n: | |
| 230 DEFAULT_TESTS.append("intl") | |
| 231 return True | 224 return True |
| 232 | 225 |
| 233 | 226 |
| 234 def ShardTests(tests, shard_count, shard_run): | 227 def ShardTests(tests, shard_count, shard_run): |
| 235 if shard_count < 2: | 228 if shard_count < 2: |
| 236 return tests | 229 return tests |
| 237 if shard_run < 1 or shard_run > shard_count: | 230 if shard_run < 1 or shard_run > shard_count: |
| 238 print "shard-run not a valid number, should be in [1:shard-count]" | 231 print "shard-run not a valid number, should be in [1:shard-count]" |
| 239 print "defaulting back to running all tests" | 232 print "defaulting back to running all tests" |
| 240 return tests | 233 return tests |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 except KeyboardInterrupt: | 397 except KeyboardInterrupt: |
| 405 return 1 | 398 return 1 |
| 406 | 399 |
| 407 if options.time: | 400 if options.time: |
| 408 verbose.PrintTestDurations(suites, overall_duration) | 401 verbose.PrintTestDurations(suites, overall_duration) |
| 409 return exit_code | 402 return exit_code |
| 410 | 403 |
| 411 | 404 |
| 412 if __name__ == "__main__": | 405 if __name__ == "__main__": |
| 413 sys.exit(Main()) | 406 sys.exit(Main()) |
| OLD | NEW |