OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
833 'tryserver@chromium.org')) | 833 'tryserver@chromium.org')) |
834 | 834 |
835 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 835 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
836 input_api, output_api)) | 836 input_api, output_api)) |
837 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 837 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
838 input_api, output_api)) | 838 input_api, output_api)) |
839 results.extend(_CheckSubversionConfig(input_api, output_api)) | 839 results.extend(_CheckSubversionConfig(input_api, output_api)) |
840 return results | 840 return results |
841 | 841 |
842 | 842 |
843 def GetDefaultTryConfigs(): | |
844 # To add tests to this list, they MUST be in | |
845 # /chrome/trunk/tools/build/masters/master.chromium/master_gatekeeper_cfg.py | |
846 # or somehow close the tree whenever they break. | |
847 standard_tests = [ | |
848 'base_unittests', | |
849 'browser_tests', | |
850 'check_deps', | |
851 'cacheinvalidation_unittests', | |
852 'content_browsertests', | |
853 'content_unittests', | |
854 'crypto_unittests', | |
855 #'gfx_unittests', | |
856 # Broken in release. | |
857 #'googleurl_unittests', | |
858 'gpu_unittests', | |
859 'ipc_tests', | |
860 'interactive_ui_tests', | |
861 'jingle_unittests', | |
862 'media_unittests', | |
863 'net_unittests', | |
864 'ppapi_unittests', | |
865 'printing_unittests', | |
866 # Too flaky. | |
867 #'pyauto_functional_tests', | |
868 'sql_unittests', | |
869 'sync_unit_tests', | |
870 # Tends to be broken by webkit roll and not fixed fast enough. | |
871 #'test_shell_tests', | |
872 'unit_tests', | |
873 #'webkit_unit_tests', | |
874 ] | |
875 | |
876 builders_and_tests = { | |
877 # TODO(maruel): Figure out a way to run 'sizes' where people can | |
878 # effectively update the perf expectation correctly. This requires a | |
879 # clobber=True build running 'sizes'. 'sizes' is not accurate with | |
880 # incremental build. Reference: | |
881 # http://chromium.org/developers/tree-sheriffs/perf-sheriffs. | |
882 # TODO(maruel): An option would be to run 'sizes' but not count a failure | |
883 # of this step as a try job failure. | |
884 'android_dbg': ['build'], | |
885 'android_clang_dbg': ['build'], | |
886 'ios_dbg_simulator': [ | |
887 'compile', | |
888 'base_unittests', | |
889 'content_unittests', | |
890 'crypto_unittests', | |
891 'googleurl_unittests', | |
892 'media_unittests', | |
893 'net_unittests', | |
894 'sql_unittests', | |
895 'ui_unittests', | |
896 ], | |
897 'ios_rel_device': ['compile'], | |
898 'linux_clang': ['compile'], | |
899 # Note: It is a Release builder even if its name convey otherwise. | |
900 'linux_chromeos': standard_tests + [ | |
901 'aura_unittests', | |
902 'chromeos_unittests', | |
903 'dbus_unittests', | |
904 'device_unittests', | |
905 'sandbox_linux_unittests', | |
906 ], | |
907 'linux_rel': standard_tests + [ | |
908 'chromedriver2_unittests', | |
909 'nacl_integration', | |
910 'remoting_unittests', | |
911 'sandbox_linux_unittests', | |
912 'sync_integration_tests', | |
913 ], | |
914 'mac': ['compile'], | |
915 'mac_rel': standard_tests + [ | |
916 'chromedriver2_unittests', | |
917 'nacl_integration', | |
918 'remoting_unittests', | |
919 'sync_integration_tests', | |
920 ], | |
921 'win': ['compile'], | |
922 'win_rel': standard_tests + [ | |
923 'chrome_frame_net_tests', | |
924 'chrome_frame_unittests', | |
925 'chromedriver2_unittests', | |
926 'installer_util_unittests', | |
927 'mini_installer_test', | |
928 'nacl_integration', | |
929 'remoting_unittests', | |
930 'sync_integration_tests', | |
931 ], | |
932 } | |
933 | |
934 bot_list = {} | |
935 for builder, tests in builders_and_tests.iteritems(): | |
936 bot_list[builder] = (builder + ':' + ','.join(list(set(tests)))) | |
M-A Ruel
2012/12/12 17:54:59
What about we convert the code in depot_tools to u
| |
937 return bot_list | |
938 | |
939 | |
843 def GetPreferredTrySlaves(project, change): | 940 def GetPreferredTrySlaves(project, change): |
844 files = change.LocalPaths() | 941 files = change.LocalPaths() |
845 | 942 |
846 if not files: | 943 if not files: |
847 return [] | 944 return [] |
848 | 945 |
946 configs = GetDefaultTryConfigs() | |
947 | |
948 def get_config(bot): | |
949 """Returns special trybot config if available, else just pass bot name.""" | |
950 return configs.get(bot, bot) | |
951 | |
849 if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): | 952 if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): |
850 return ['mac_rel', 'mac_asan'] | 953 return [get_config('mac_rel'), get_config('mac_asan')] |
851 if all(re.search('(^|[/_])win[/_.]', f) for f in files): | 954 if all(re.search('(^|[/_])win[/_.]', f) for f in files): |
852 return ['win_rel'] | 955 return [get_config('win_rel')] |
853 if all(re.search('(^|[/_])android[/_.]', f) for f in files): | 956 if all(re.search('(^|[/_])android[/_.]', f) for f in files): |
854 return ['android_dbg', 'android_clang_dbg'] | 957 return [get_config('android_dbg'), get_config('android_clang_dbg')] |
855 if all(re.search('^native_client_sdk', f) for f in files): | 958 if all(re.search('^native_client_sdk', f) for f in files): |
856 return ['linux_nacl_sdk', 'win_nacl_sdk', 'mac_nacl_sdk'] | 959 return [get_config('linux_nacl_sdk'), get_config('win_nacl_sdk'), |
960 get_config('mac_nacl_sdk')] | |
857 if all(re.search('[/_]ios[/_.]', f) for f in files): | 961 if all(re.search('[/_]ios[/_.]', f) for f in files): |
858 return ['ios_rel_device', 'ios_dbg_simulator'] | 962 return [get_config('ios_rel_device'), get_config('ios_dbg_simulator')] |
859 | 963 |
860 trybots = [ | 964 trybots = [ |
861 'android_clang_dbg', | 965 'android_clang_dbg', |
M-A Ruel
2012/12/12 17:54:59
In theory, all this list disappears.
| |
862 'android_dbg', | 966 'android_dbg', |
863 'ios_dbg_simulator', | 967 'ios_dbg_simulator', |
864 'ios_rel_device', | 968 'ios_rel_device', |
865 'linux_asan', | 969 'linux_asan', |
866 'linux_aura', | 970 'linux_aura', |
867 'linux_chromeos', | 971 'linux_chromeos', |
868 'linux_clang:compile', | 972 'linux_clang', |
869 'linux_rel', | 973 'linux_rel', |
870 'mac_asan', | 974 'mac_asan', |
871 'mac_rel', | 975 'mac_rel', |
872 'win_aura', | 976 'win_aura', |
873 'win_rel', | 977 'win_rel', |
874 ] | 978 ] |
875 | 979 |
876 # Match things like path/aura/file.cc and path/file_aura.cc. | 980 # Match things like path/aura/file.cc and path/file_aura.cc. |
877 # Same for chromeos. | 981 # Same for chromeos. |
878 if any(re.search('[/_](aura|chromeos)', f) for f in files): | 982 if any(re.search('[/_](aura|chromeos)', f) for f in files): |
879 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] | 983 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] |
880 | 984 |
881 return trybots | 985 return [get_config(bot) for bot in trybots] |
OLD | NEW |