| 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 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 global VARIANT_FLAGS | 1265 global VARIANT_FLAGS |
| 1266 if options.stress_only: | 1266 if options.stress_only: |
| 1267 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] | 1267 VARIANT_FLAGS = [['--stress-opt', '--always-opt']] |
| 1268 if options.nostress: | 1268 if options.nostress: |
| 1269 VARIANT_FLAGS = [[],['--nocrankshaft']] | 1269 VARIANT_FLAGS = [[],['--nocrankshaft']] |
| 1270 if options.crankshaft: | 1270 if options.crankshaft: |
| 1271 if options.special_command: | 1271 if options.special_command: |
| 1272 options.special_command += " --crankshaft" | 1272 options.special_command += " --crankshaft" |
| 1273 else: | 1273 else: |
| 1274 options.special_command = "@--crankshaft" | 1274 options.special_command = "@--crankshaft" |
| 1275 if options.shell == "d8": |
| 1276 if options.special_command: |
| 1277 options.special_command += " --test" |
| 1278 else: |
| 1279 options.special_command = "@--test" |
| 1275 if options.noprof: | 1280 if options.noprof: |
| 1276 options.scons_flags.append("prof=off") | 1281 options.scons_flags.append("prof=off") |
| 1277 options.scons_flags.append("profilingsupport=off") | 1282 options.scons_flags.append("profilingsupport=off") |
| 1278 return True | 1283 return True |
| 1279 | 1284 |
| 1280 | 1285 |
| 1281 REPORT_TEMPLATE = """\ | 1286 REPORT_TEMPLATE = """\ |
| 1282 Total: %(total)i tests | 1287 Total: %(total)i tests |
| 1283 * %(skipped)4d tests will be skipped | 1288 * %(skipped)4d tests will be skipped |
| 1284 * %(nocrash)4d tests are expected to be flaky but not crash | 1289 * %(nocrash)4d tests are expected to be flaky but not crash |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 all_unused = [ ] | 1435 all_unused = [ ] |
| 1431 unclassified_tests = [ ] | 1436 unclassified_tests = [ ] |
| 1432 globally_unused_rules = None | 1437 globally_unused_rules = None |
| 1433 for path in paths: | 1438 for path in paths: |
| 1434 for mode in options.mode: | 1439 for mode in options.mode: |
| 1435 env = { | 1440 env = { |
| 1436 'mode': mode, | 1441 'mode': mode, |
| 1437 'system': utils.GuessOS(), | 1442 'system': utils.GuessOS(), |
| 1438 'arch': options.arch, | 1443 'arch': options.arch, |
| 1439 'simulator': options.simulator, | 1444 'simulator': options.simulator, |
| 1440 'crankshaft': options.crankshaft | 1445 'crankshaft': options.crankshaft, |
| 1446 'isolates': options.isolates |
| 1441 } | 1447 } |
| 1442 test_list = root.ListTests([], path, context, mode, []) | 1448 test_list = root.ListTests([], path, context, mode, []) |
| 1443 unclassified_tests += test_list | 1449 unclassified_tests += test_list |
| 1444 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) | 1450 (cases, unused_rules, all_outcomes) = config.ClassifyTests(test_list, env) |
| 1445 if globally_unused_rules is None: | 1451 if globally_unused_rules is None: |
| 1446 globally_unused_rules = set(unused_rules) | 1452 globally_unused_rules = set(unused_rules) |
| 1447 else: | 1453 else: |
| 1448 globally_unused_rules = globally_unused_rules.intersection(unused_rules) | 1454 globally_unused_rules = globally_unused_rules.intersection(unused_rules) |
| 1449 all_cases += ShardTests(cases, options) | 1455 all_cases += ShardTests(cases, options) |
| 1450 all_unused.append(unused_rules) | 1456 all_unused.append(unused_rules) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 for entry in timed_tests[:20]: | 1507 for entry in timed_tests[:20]: |
| 1502 t = FormatTime(entry.duration) | 1508 t = FormatTime(entry.duration) |
| 1503 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) | 1509 sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel())) |
| 1504 index += 1 | 1510 index += 1 |
| 1505 | 1511 |
| 1506 return result | 1512 return result |
| 1507 | 1513 |
| 1508 | 1514 |
| 1509 if __name__ == '__main__': | 1515 if __name__ == '__main__': |
| 1510 sys.exit(Main()) | 1516 sys.exit(Main()) |
| OLD | NEW |