| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2008 the V8 project authors. All rights reserved. | 3 # Copyright 2008 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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 dest="store_unexpected_output", default=True, action="store_true") | 1195 dest="store_unexpected_output", default=True, action="store_true") |
| 1196 result.add_option("--no-store-unexpected-output", | 1196 result.add_option("--no-store-unexpected-output", |
| 1197 help="Deletes the temporary JS files from tests that fails", | 1197 help="Deletes the temporary JS files from tests that fails", |
| 1198 dest="store_unexpected_output", action="store_false") | 1198 dest="store_unexpected_output", action="store_false") |
| 1199 result.add_option("--stress-only", | 1199 result.add_option("--stress-only", |
| 1200 help="Only run tests with --always-opt --stress-opt", | 1200 help="Only run tests with --always-opt --stress-opt", |
| 1201 default=False, action="store_true") | 1201 default=False, action="store_true") |
| 1202 result.add_option("--nostress", | 1202 result.add_option("--nostress", |
| 1203 help="Don't run crankshaft --always-opt --stress-op test", | 1203 help="Don't run crankshaft --always-opt --stress-op test", |
| 1204 default=False, action="store_true") | 1204 default=False, action="store_true") |
| 1205 result.add_option("--crankshaft", |
| 1206 help="Run with the --crankshaft flag", |
| 1207 default=False, action="store_true") |
| 1205 result.add_option("--shard-count", | 1208 result.add_option("--shard-count", |
| 1206 help="Split testsuites into this number of shards", | 1209 help="Split testsuites into this number of shards", |
| 1207 default=1, type="int") | 1210 default=1, type="int") |
| 1208 result.add_option("--shard-run", | 1211 result.add_option("--shard-run", |
| 1209 help="Run this shard from the split up tests.", | 1212 help="Run this shard from the split up tests.", |
| 1210 default=1, type="int") | 1213 default=1, type="int") |
| 1211 result.add_option("--noprof", help="Disable profiling support", | 1214 result.add_option("--noprof", help="Disable profiling support", |
| 1212 default=False) | 1215 default=False) |
| 1213 return result | 1216 return result |
| 1214 | 1217 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1235 # If options.arch is not set by the command line and no simulator setting | 1238 # If options.arch is not set by the command line and no simulator setting |
| 1236 # was found, set the arch to the guess. | 1239 # was found, set the arch to the guess. |
| 1237 if options.arch == 'none': | 1240 if options.arch == 'none': |
| 1238 options.arch = ARCH_GUESS | 1241 options.arch = ARCH_GUESS |
| 1239 options.scons_flags.append("arch=" + options.arch) | 1242 options.scons_flags.append("arch=" + options.arch) |
| 1240 if options.snapshot: | 1243 if options.snapshot: |
| 1241 options.scons_flags.append("snapshot=on") | 1244 options.scons_flags.append("snapshot=on") |
| 1242 global VARIANT_FLAGS | 1245 global VARIANT_FLAGS |
| 1243 if options.stress_only: | 1246 if options.stress_only: |
| 1244 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] | 1247 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] |
| 1248 if options.nostress: |
| 1249 VARIANT_FLAGS = [[],['--nocrankshaft']] |
| 1250 if options.crankshaft: |
| 1251 if options.special_command: |
| 1252 options.special_command += " --crankshaft" |
| 1253 else: |
| 1254 options.special_command = "@--crankshaft" |
| 1245 if options.noprof: | 1255 if options.noprof: |
| 1246 options.scons_flags.append("prof=off") | 1256 options.scons_flags.append("prof=off") |
| 1247 options.scons_flags.append("profilingsupport=off") | 1257 options.scons_flags.append("profilingsupport=off") |
| 1248 return True | 1258 return True |
| 1249 | 1259 |
| 1250 | 1260 |
| 1251 REPORT_TEMPLATE = """\ | 1261 REPORT_TEMPLATE = """\ |
| 1252 Total: %(total)i tests | 1262 Total: %(total)i tests |
| 1253 * %(skipped)4d tests will be skipped | 1263 * %(skipped)4d tests will be skipped |
| 1254 * %(nocrash)4d tests are expected to be flaky but not crash | 1264 * %(nocrash)4d tests are expected to be flaky but not crash |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 all_cases = [ ] | 1409 all_cases = [ ] |
| 1400 all_unused = [ ] | 1410 all_unused = [ ] |
| 1401 unclassified_tests = [ ] | 1411 unclassified_tests = [ ] |
| 1402 globally_unused_rules = None | 1412 globally_unused_rules = None |
| 1403 for path in paths: | 1413 for path in paths: |
| 1404 for mode in options.mode: | 1414 for mode in options.mode: |
| 1405 env = { | 1415 env = { |
| 1406 'mode': mode, | 1416 'mode': mode, |
| 1407 'system': utils.GuessOS(), | 1417 'system': utils.GuessOS(), |
| 1408 'arch': options.arch, | 1418 'arch': options.arch, |
| 1409 'simulator': options.simulator | 1419 'simulator': options.simulator, |
| 1420 'crankshaft': options.crankshaft |
| 1410 } | 1421 } |
| 1411 test_list = root.ListTests([], path, context, mode, []) | 1422 test_list = root.ListTests([], path, context, mode, []) |
| 1412 unclassified_tests += test_list | 1423 unclassified_tests += test_list |
| 1413 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) | 1424 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) |
| 1414 if globally_unused_rules is None: | 1425 if globally_unused_rules is None: |
| 1415 globally_unused_rules = set(unused_rules) | 1426 globally_unused_rules = set(unused_rules) |
| 1416 else: | 1427 else: |
| 1417 globally_unused_rules = globally_unused_rules.intersection(unused_rules) | 1428 globally_unused_rules = globally_unused_rules.intersection(unused_rules) |
| 1418 all_cases += ShardTests(cases, options) | 1429 all_cases += ShardTests(cases, options) |
| 1419 all_unused.append(unused_rules) | 1430 all_unused.append(unused_rules) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 for entry in timed_tests[:20]: | 1481 for entry in timed_tests[:20]: |
| 1471 t = FormatTime(entry.duration) | 1482 t = FormatTime(entry.duration) |
| 1472 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1483 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
| 1473 index += 1 | 1484 index += 1 |
| 1474 | 1485 |
| 1475 return result | 1486 return result |
| 1476 | 1487 |
| 1477 | 1488 |
| 1478 if __name__ == '__main__': | 1489 if __name__ == '__main__': |
| 1479 sys.exit(Main()) | 1490 sys.exit(Main()) |
| OLD | NEW |