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 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 dest="store_unexpected_output", default=True, action="store_true") | 1239 dest="store_unexpected_output", default=True, action="store_true") |
1240 result.add_option("--no-store-unexpected-output", | 1240 result.add_option("--no-store-unexpected-output", |
1241 help="Deletes the temporary JS files from tests that fails", | 1241 help="Deletes the temporary JS files from tests that fails", |
1242 dest="store_unexpected_output", action="store_false") | 1242 dest="store_unexpected_output", action="store_false") |
1243 result.add_option("--stress-only", | 1243 result.add_option("--stress-only", |
1244 help="Only run tests with --always-opt --stress-opt", | 1244 help="Only run tests with --always-opt --stress-opt", |
1245 default=False, action="store_true") | 1245 default=False, action="store_true") |
1246 result.add_option("--nostress", | 1246 result.add_option("--nostress", |
1247 help="Don't run crankshaft --always-opt --stress-op test", | 1247 help="Don't run crankshaft --always-opt --stress-op test", |
1248 default=False, action="store_true") | 1248 default=False, action="store_true") |
1249 result.add_option("--crankshaft", | |
1250 help="Run with the --crankshaft flag", | |
1251 default=False, action="store_true") | |
1252 result.add_option("--shard-count", | 1249 result.add_option("--shard-count", |
1253 help="Split testsuites into this number of shards", | 1250 help="Split testsuites into this number of shards", |
1254 default=1, type="int") | 1251 default=1, type="int") |
1255 result.add_option("--shard-run", | 1252 result.add_option("--shard-run", |
1256 help="Run this shard from the split up tests.", | 1253 help="Run this shard from the split up tests.", |
1257 default=1, type="int") | 1254 default=1, type="int") |
1258 result.add_option("--noprof", help="Disable profiling support", | 1255 result.add_option("--noprof", help="Disable profiling support", |
1259 default=False) | 1256 default=False) |
1260 return result | 1257 return result |
1261 | 1258 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 if options.snapshot: | 1290 if options.snapshot: |
1294 options.scons_flags.append("snapshot=on") | 1291 options.scons_flags.append("snapshot=on") |
1295 global VARIANT_FLAGS | 1292 global VARIANT_FLAGS |
1296 if options.mips_arch_variant: | 1293 if options.mips_arch_variant: |
1297 options.scons_flags.append("mips_arch_variant=" + options.mips_arch_variant) | 1294 options.scons_flags.append("mips_arch_variant=" + options.mips_arch_variant) |
1298 | 1295 |
1299 if options.stress_only: | 1296 if options.stress_only: |
1300 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] | 1297 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] |
1301 if options.nostress: | 1298 if options.nostress: |
1302 VARIANT_FLAGS = [[],['--nocrankshaft']] | 1299 VARIANT_FLAGS = [[],['--nocrankshaft']] |
1303 if options.crankshaft: | |
1304 if options.special_command: | |
1305 options.special_command += " --crankshaft" | |
1306 else: | |
1307 options.special_command = "@ --crankshaft" | |
1308 if options.shell.endswith("d8"): | 1300 if options.shell.endswith("d8"): |
1309 if options.special_command: | 1301 if options.special_command: |
1310 options.special_command += " --test" | 1302 options.special_command += " --test" |
1311 else: | 1303 else: |
1312 options.special_command = "@ --test" | 1304 options.special_command = "@ --test" |
1313 if options.noprof: | 1305 if options.noprof: |
1314 options.scons_flags.append("prof=off") | 1306 options.scons_flags.append("prof=off") |
1315 options.scons_flags.append("profilingsupport=off") | 1307 options.scons_flags.append("profilingsupport=off") |
1316 if options.build_system == 'gyp': | 1308 if options.build_system == 'gyp': |
1317 if options.build_only: | 1309 if options.build_only: |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 all_unused = [ ] | 1478 all_unused = [ ] |
1487 unclassified_tests = [ ] | 1479 unclassified_tests = [ ] |
1488 globally_unused_rules = None | 1480 globally_unused_rules = None |
1489 for path in paths: | 1481 for path in paths: |
1490 for mode in options.mode: | 1482 for mode in options.mode: |
1491 env = { | 1483 env = { |
1492 'mode': mode, | 1484 'mode': mode, |
1493 'system': utils.GuessOS(), | 1485 'system': utils.GuessOS(), |
1494 'arch': options.arch, | 1486 'arch': options.arch, |
1495 'simulator': options.simulator, | 1487 'simulator': options.simulator, |
1496 'crankshaft': options.crankshaft, | |
1497 'isolates': options.isolates | 1488 'isolates': options.isolates |
1498 } | 1489 } |
1499 test_list = root.ListTests([], path, context, mode, []) | 1490 test_list = root.ListTests([], path, context, mode, []) |
1500 unclassified_tests += test_list | 1491 unclassified_tests += test_list |
1501 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) | 1492 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) |
1502 if globally_unused_rules is None: | 1493 if globally_unused_rules is None: |
1503 globally_unused_rules = set(unused_rules) | 1494 globally_unused_rules = set(unused_rules) |
1504 else: | 1495 else: |
1505 globally_unused_rules = globally_unused_rules.intersection(unused_rules) | 1496 globally_unused_rules = globally_unused_rules.intersection(unused_rules) |
1506 all_cases += ShardTests(cases, options) | 1497 all_cases += ShardTests(cases, options) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 for entry in timed_tests[:20]: | 1548 for entry in timed_tests[:20]: |
1558 t = FormatTime(entry.duration) | 1549 t = FormatTime(entry.duration) |
1559 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1550 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
1560 index += 1 | 1551 index += 1 |
1561 | 1552 |
1562 return result | 1553 return result |
1563 | 1554 |
1564 | 1555 |
1565 if __name__ == '__main__': | 1556 if __name__ == '__main__': |
1566 sys.exit(Main()) | 1557 sys.exit(Main()) |
OLD | NEW |