Commit 59e892df authored by tandrii's avatar tandrii Committed by Commit bot

Get rid of GetPreferredTryMasters that just loads cq.cfg.

git cl try now schedules CQ dry run by default.

BUG=577224
R=sergiyb@chromium.org,phajdan.jr@chromium.org

Review-Url: https://codereview.chromium.org/2151543002
Cr-Commit-Position: refs/heads/master@{#405218}
parent b737caa2
...@@ -320,30 +320,3 @@ def CheckChangeOnCommit(input_api, output_api): ...@@ -320,30 +320,3 @@ def CheckChangeOnCommit(input_api, output_api):
results.extend(input_api.canned_checks.CheckChangeHasDescription( results.extend(input_api.canned_checks.CheckChangeHasDescription(
input_api, output_api)) input_api, output_api))
return results return results
def GetPreferredTryMasters(project, change):
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