| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 result.add_option("--extra-flags", | 105 result.add_option("--extra-flags", |
| 106 help="Additional flags to pass to each test command", | 106 help="Additional flags to pass to each test command", |
| 107 default="") | 107 default="") |
| 108 result.add_option("--isolates", help="Whether to test isolates", | 108 result.add_option("--isolates", help="Whether to test isolates", |
| 109 default=False, action="store_true") | 109 default=False, action="store_true") |
| 110 result.add_option("-j", help="The number of parallel tasks to run", | 110 result.add_option("-j", help="The number of parallel tasks to run", |
| 111 default=0, type="int") | 111 default=0, type="int") |
| 112 result.add_option("-m", "--mode", | 112 result.add_option("-m", "--mode", |
| 113 help="The test modes in which to run (comma-separated)", | 113 help="The test modes in which to run (comma-separated)", |
| 114 default="release,debug") | 114 default="release,debug") |
| 115 result.add_option("--no-i18n", "--noi18n", |
| 116 help="Skip internationalization tests", |
| 117 default=False, action="store_true") |
| 115 result.add_option("--no-network", "--nonetwork", | 118 result.add_option("--no-network", "--nonetwork", |
| 116 help="Don't distribute tests on the network", | 119 help="Don't distribute tests on the network", |
| 117 default=(utils.GuessOS() != "linux"), | 120 default=(utils.GuessOS() != "linux"), |
| 118 dest="no_network", action="store_true") | 121 dest="no_network", action="store_true") |
| 119 result.add_option("--no-presubmit", "--nopresubmit", | 122 result.add_option("--no-presubmit", "--nopresubmit", |
| 120 help='Skip presubmit checks', | 123 help='Skip presubmit checks', |
| 121 default=False, dest="no_presubmit", action="store_true") | 124 default=False, dest="no_presubmit", action="store_true") |
| 122 result.add_option("--no-stress", "--nostress", | 125 result.add_option("--no-stress", "--nostress", |
| 123 help="Don't run crankshaft --always-opt --stress-op test", | 126 help="Don't run crankshaft --always-opt --stress-op test", |
| 124 default=False, dest="no_stress", action="store_true") | 127 default=False, dest="no_stress", action="store_true") |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 if options.stress_only: | 206 if options.stress_only: |
| 204 VARIANT_FLAGS = [["--stress-opt", "--always-opt"]] | 207 VARIANT_FLAGS = [["--stress-opt", "--always-opt"]] |
| 205 if options.valgrind: | 208 if options.valgrind: |
| 206 run_valgrind = os.path.join("tools", "run-valgrind.py") | 209 run_valgrind = os.path.join("tools", "run-valgrind.py") |
| 207 # This is OK for distributed running, so we don't need to set no_network. | 210 # This is OK for distributed running, so we don't need to set no_network. |
| 208 options.command_prefix = (["python", "-u", run_valgrind] + | 211 options.command_prefix = (["python", "-u", run_valgrind] + |
| 209 options.command_prefix) | 212 options.command_prefix) |
| 210 if not options.flaky_tests in ["run", "skip", "dontcare"]: | 213 if not options.flaky_tests in ["run", "skip", "dontcare"]: |
| 211 print "Unknown flaky test mode %s" % options.flaky_tests | 214 print "Unknown flaky test mode %s" % options.flaky_tests |
| 212 return False | 215 return False |
| 216 if not options.no_i18n: |
| 217 DEFAULT_TESTS.append("intl") |
| 213 return True | 218 return True |
| 214 | 219 |
| 215 | 220 |
| 216 def ShardTests(tests, shard_count, shard_run): | 221 def ShardTests(tests, shard_count, shard_run): |
| 217 if shard_count < 2: | 222 if shard_count < 2: |
| 218 return tests | 223 return tests |
| 219 if shard_run < 1 or shard_run > shard_count: | 224 if shard_run < 1 or shard_run > shard_count: |
| 220 print "shard-run not a valid number, should be in [1:shard-count]" | 225 print "shard-run not a valid number, should be in [1:shard-count]" |
| 221 print "defaulting back to running all tests" | 226 print "defaulting back to running all tests" |
| 222 return tests | 227 return tests |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 except KeyboardInterrupt: | 388 except KeyboardInterrupt: |
| 384 return 1 | 389 return 1 |
| 385 | 390 |
| 386 if options.time: | 391 if options.time: |
| 387 verbose.PrintTestDurations(suites, overall_duration) | 392 verbose.PrintTestDurations(suites, overall_duration) |
| 388 return exit_code | 393 return exit_code |
| 389 | 394 |
| 390 | 395 |
| 391 if __name__ == "__main__": | 396 if __name__ == "__main__": |
| 392 sys.exit(Main()) | 397 sys.exit(Main()) |
| OLD | NEW |