Commit cf788752 authored by mithro's avatar mithro Committed by Commit bot

cc: Adding presubmit to include blink tests

Changes in the src/cc directory can often affect the layout tests in Blink
however Chromium commit queue doesn't run these tests by default. This leads to
breakages being discovered only when the Blink dep is rolled into Chromium.

By adding the following line to the CL's description the Blink tests will be
run in addition to the normal Chromium tests;
 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

BUG=483372
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#330911}
parent 8d57a015
......@@ -333,3 +333,31 @@ def GetPreferredTryMasters(project, change):
'linux_blink_rel': set(['defaulttests']),
},
}
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots list to the CL description in order to run
Blink tests in addition to CQ try bots.
"""
rietveld_obj = cl.RpcServer()
issue = cl.issue
description = rietveld_obj.get_description(issue)
if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I):
return []
bots = GetPreferredTryMasters(None, change)
bots_string_bits = []
for master in bots.keys():
bots_string_bits.append("%s:%s" % (master, ','.join(bots[master].keys())))
results = []
new_description = description
new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots_string_bits)
results.append(output_api.PresubmitNotifyResult(
'Automatically added Perf trybots to run Blink tests on CQ.'))
if new_description != description:
rietveld_obj.update_description(issue, new_description)
return results
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