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