Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index b395233d2462df2c941367ae9b9a33ca0d2afce1..a1b6c574fb7674ebe6e8026643a2645542a35847 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -840,22 +840,126 @@ def CheckChangeOnCommit(input_api, output_api): |
| return results |
| +def GetDefaultTryConfigs(): |
| + # To add tests to this list, they MUST be in |
| + # /chrome/trunk/tools/build/masters/master.chromium/master_gatekeeper_cfg.py |
| + # or somehow close the tree whenever they break. |
| + standard_tests = [ |
| + 'base_unittests', |
| + 'browser_tests', |
| + 'check_deps', |
| + 'cacheinvalidation_unittests', |
| + 'content_browsertests', |
| + 'content_unittests', |
| + 'crypto_unittests', |
| + #'gfx_unittests', |
| + # Broken in release. |
| + #'googleurl_unittests', |
| + 'gpu_unittests', |
| + 'ipc_tests', |
| + 'interactive_ui_tests', |
| + 'jingle_unittests', |
| + 'media_unittests', |
| + 'net_unittests', |
| + 'ppapi_unittests', |
| + 'printing_unittests', |
| + # Too flaky. |
| + #'pyauto_functional_tests', |
| + 'sql_unittests', |
| + 'sync_unit_tests', |
| + # Tends to be broken by webkit roll and not fixed fast enough. |
| + #'test_shell_tests', |
| + 'unit_tests', |
| + #'webkit_unit_tests', |
| + ] |
| + |
| + builders_and_tests = { |
| + # TODO(maruel): Figure out a way to run 'sizes' where people can |
| + # effectively update the perf expectation correctly. This requires a |
| + # clobber=True build running 'sizes'. 'sizes' is not accurate with |
| + # incremental build. Reference: |
| + # http://chromium.org/developers/tree-sheriffs/perf-sheriffs. |
| + # TODO(maruel): An option would be to run 'sizes' but not count a failure |
| + # of this step as a try job failure. |
| + 'android_dbg': ['build'], |
| + 'android_clang_dbg': ['build'], |
| + 'ios_dbg_simulator': [ |
| + 'compile', |
| + 'base_unittests', |
| + 'content_unittests', |
| + 'crypto_unittests', |
| + 'googleurl_unittests', |
| + 'media_unittests', |
| + 'net_unittests', |
| + 'sql_unittests', |
| + 'ui_unittests', |
| + ], |
| + 'ios_rel_device': ['compile'], |
| + 'linux_clang': ['compile'], |
| + # Note: It is a Release builder even if its name convey otherwise. |
| + 'linux_chromeos': standard_tests + [ |
| + 'aura_unittests', |
| + 'chromeos_unittests', |
| + 'dbus_unittests', |
| + 'device_unittests', |
| + 'sandbox_linux_unittests', |
| + ], |
| + 'linux_rel': standard_tests + [ |
| + 'chromedriver2_unittests', |
| + 'nacl_integration', |
| + 'remoting_unittests', |
| + 'sandbox_linux_unittests', |
| + 'sync_integration_tests', |
| + ], |
| + 'mac': ['compile'], |
| + 'mac_rel': standard_tests + [ |
| + 'chromedriver2_unittests', |
| + 'nacl_integration', |
| + 'remoting_unittests', |
| + 'sync_integration_tests', |
| + ], |
| + 'win': ['compile'], |
| + 'win_rel': standard_tests + [ |
| + 'chrome_frame_net_tests', |
| + 'chrome_frame_unittests', |
| + 'chromedriver2_unittests', |
| + 'installer_util_unittests', |
| + 'mini_installer_test', |
| + 'nacl_integration', |
| + 'remoting_unittests', |
| + 'sync_integration_tests', |
| + ], |
| + } |
| + |
| + bot_list = {} |
| + for builder, tests in builders_and_tests.iteritems(): |
| + 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
|
| + return bot_list |
| + |
| + |
| def GetPreferredTrySlaves(project, change): |
| files = change.LocalPaths() |
| if not files: |
| return [] |
| + configs = GetDefaultTryConfigs() |
| + |
| + def get_config(bot): |
| + """Returns special trybot config if available, else just pass bot name.""" |
| + return configs.get(bot, bot) |
| + |
| if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): |
| - return ['mac_rel', 'mac_asan'] |
| + return [get_config('mac_rel'), get_config('mac_asan')] |
| if all(re.search('(^|[/_])win[/_.]', f) for f in files): |
| - return ['win_rel'] |
| + return [get_config('win_rel')] |
| if all(re.search('(^|[/_])android[/_.]', f) for f in files): |
| - return ['android_dbg', 'android_clang_dbg'] |
| + return [get_config('android_dbg'), get_config('android_clang_dbg')] |
| if all(re.search('^native_client_sdk', f) for f in files): |
| - return ['linux_nacl_sdk', 'win_nacl_sdk', 'mac_nacl_sdk'] |
| + return [get_config('linux_nacl_sdk'), get_config('win_nacl_sdk'), |
| + get_config('mac_nacl_sdk')] |
| if all(re.search('[/_]ios[/_.]', f) for f in files): |
| - return ['ios_rel_device', 'ios_dbg_simulator'] |
| + return [get_config('ios_rel_device'), get_config('ios_dbg_simulator')] |
| trybots = [ |
| 'android_clang_dbg', |
|
M-A Ruel
2012/12/12 17:54:59
In theory, all this list disappears.
|
| @@ -865,7 +969,7 @@ def GetPreferredTrySlaves(project, change): |
| 'linux_asan', |
| 'linux_aura', |
| 'linux_chromeos', |
| - 'linux_clang:compile', |
| + 'linux_clang', |
| 'linux_rel', |
| 'mac_asan', |
| 'mac_rel', |
| @@ -878,4 +982,4 @@ def GetPreferredTrySlaves(project, change): |
| if any(re.search('[/_](aura|chromeos)', f) for f in files): |
| trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] |
| - return trybots |
| + return [get_config(bot) for bot in trybots] |