| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 ARCH_GUESS = utils.DefaultArch() | 60 ARCH_GUESS = utils.DefaultArch() |
| 61 | 61 |
| 62 # Map of test name synonyms to lists of test suites. Should be ordered by | 62 # Map of test name synonyms to lists of test suites. Should be ordered by |
| 63 # expected runtimes (suites with slow test cases first). These groups are | 63 # expected runtimes (suites with slow test cases first). These groups are |
| 64 # invoked in seperate steps on the bots. | 64 # invoked in seperate steps on the bots. |
| 65 TEST_MAP = { | 65 TEST_MAP = { |
| 66 # This needs to stay in sync with test/bot_default.isolate. | 66 # This needs to stay in sync with test/bot_default.isolate. |
| 67 "bot_default": [ | 67 "bot_default": [ |
| 68 "mjsunit", | 68 "mjsunit", |
| 69 "debugger", |
| 69 "cctest", | 70 "cctest", |
| 70 "webkit", | 71 "webkit", |
| 71 "inspector", | 72 "inspector", |
| 72 "fuzzer", | 73 "fuzzer", |
| 73 "message", | 74 "message", |
| 74 "preparser", | 75 "preparser", |
| 75 "intl", | 76 "intl", |
| 76 "unittests", | 77 "unittests", |
| 77 ], | 78 ], |
| 78 # This needs to stay in sync with test/default.isolate. | 79 # This needs to stay in sync with test/default.isolate. |
| 79 "default": [ | 80 "default": [ |
| 80 "mjsunit", | 81 "mjsunit", |
| 82 "debugger", |
| 81 "cctest", | 83 "cctest", |
| 82 "fuzzer", | 84 "fuzzer", |
| 83 "message", | 85 "message", |
| 84 "preparser", | 86 "preparser", |
| 85 "intl", | 87 "intl", |
| 86 "unittests", | 88 "unittests", |
| 87 ], | 89 ], |
| 88 # This needs to stay in sync with test/optimize_for_size.isolate. | 90 # This needs to stay in sync with test/optimize_for_size.isolate. |
| 89 "optimize_for_size": [ | 91 "optimize_for_size": [ |
| 90 "mjsunit", | 92 "mjsunit", |
| 93 "debugger", |
| 91 "cctest", | 94 "cctest", |
| 92 "webkit", | 95 "webkit", |
| 93 "inspector", | 96 "inspector", |
| 94 "intl", | 97 "intl", |
| 95 ], | 98 ], |
| 96 "unittests": [ | 99 "unittests": [ |
| 97 "unittests", | 100 "unittests", |
| 98 ], | 101 ], |
| 99 } | 102 } |
| 100 | 103 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 if not CheckTestMode("slow test", options.slow_tests): | 606 if not CheckTestMode("slow test", options.slow_tests): |
| 604 return False | 607 return False |
| 605 if not CheckTestMode("pass|fail test", options.pass_fail_tests): | 608 if not CheckTestMode("pass|fail test", options.pass_fail_tests): |
| 606 return False | 609 return False |
| 607 if options.no_i18n: | 610 if options.no_i18n: |
| 608 TEST_MAP["bot_default"].remove("intl") | 611 TEST_MAP["bot_default"].remove("intl") |
| 609 TEST_MAP["default"].remove("intl") | 612 TEST_MAP["default"].remove("intl") |
| 610 if not options.enable_inspector: | 613 if not options.enable_inspector: |
| 611 TEST_MAP["bot_default"].remove("inspector") | 614 TEST_MAP["bot_default"].remove("inspector") |
| 612 TEST_MAP["optimize_for_size"].remove("inspector") | 615 TEST_MAP["optimize_for_size"].remove("inspector") |
| 616 TEST_MAP["default"].remove("debugger") |
| 617 TEST_MAP["bot_default"].remove("debugger") |
| 618 TEST_MAP["optimize_for_size"].remove("debugger") |
| 613 return True | 619 return True |
| 614 | 620 |
| 615 | 621 |
| 616 def ShardTests(tests, options): | 622 def ShardTests(tests, options): |
| 617 # Read gtest shard configuration from environment (e.g. set by swarming). | 623 # Read gtest shard configuration from environment (e.g. set by swarming). |
| 618 # If none is present, use values passed on the command line. | 624 # If none is present, use values passed on the command line. |
| 619 shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count)) | 625 shard_count = int(os.environ.get('GTEST_TOTAL_SHARDS', options.shard_count)) |
| 620 shard_run = os.environ.get('GTEST_SHARD_INDEX') | 626 shard_run = os.environ.get('GTEST_SHARD_INDEX') |
| 621 if shard_run is not None: | 627 if shard_run is not None: |
| 622 # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0. | 628 # The v8 shard_run starts at 1, while GTEST_SHARD_INDEX starts at 0. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 "--coverage-dir=%s" % options.sancov_dir]) | 923 "--coverage-dir=%s" % options.sancov_dir]) |
| 918 except: | 924 except: |
| 919 print >> sys.stderr, "Error: Merging sancov files failed." | 925 print >> sys.stderr, "Error: Merging sancov files failed." |
| 920 exit_code = 1 | 926 exit_code = 1 |
| 921 | 927 |
| 922 return exit_code | 928 return exit_code |
| 923 | 929 |
| 924 | 930 |
| 925 if __name__ == "__main__": | 931 if __name__ == "__main__": |
| 926 sys.exit(Main()) | 932 sys.exit(Main()) |
| OLD | NEW |