Commit 7ecd4d51 authored by akuegel@chromium.org's avatar akuegel@chromium.org

Let GetPreferredTryMasters read from CQ config.

BUG=521927

Review URL: https://codereview.chromium.org/1294313002

git-svn-id: svn://svn.chromium.org/blink/trunk@200806 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f68e44c4
......@@ -344,17 +344,27 @@ def CheckChangeOnCommit(input_api, output_api):
def GetPreferredTryMasters(project, change):
return {
'tryserver.blink': {
'android_blink_compile_dbg': set(['defaulttests']),
'android_blink_compile_rel': set(['defaulttests']),
'android_chromium_gn_compile_rel': set(['defaulttests']),
'linux_blink_compile_dbg': set(['defaulttests']),
'linux_blink_rel': set(['defaulttests']),
'linux_chromium_gn_rel': set(['defaulttests']),
'mac_blink_compile_dbg': set(['defaulttests']),
'mac_blink_rel': set(['defaulttests']),
'win_blink_compile_dbg': set(['defaulttests']),
'win_blink_rel': set(['defaulttests']),
},
}
import json
import os.path
import platform
import subprocess
cq_config_path = os.path.join(
change.RepositoryRoot(), 'infra', 'config', 'cq.cfg')
# commit_queue.py below is a script in depot_tools directory, which has a
# 'builders' command to retrieve a list of CQ builders from the CQ config.
is_win = platform.system() == 'Windows'
masters = json.loads(subprocess.check_output(
['commit_queue', 'builders', cq_config_path], shell=is_win))
try_config = {}
for master in masters:
try_config.setdefault(master, {})
for builder in masters[master]:
# Do not trigger presubmit builders, since they're likely to fail
# (e.g. OWNERS checks before finished code review), and we're
# running local presubmit anyway.
if 'presubmit' not in builder:
try_config[master][builder] = ['defaulttests']
return try_config
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment