Skip to content

Commit

Permalink
cc: Adding presubmit to include blink tests
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
mithro authored and Commit bot committed May 21, 2015
1 parent 8d57a01 commit cf78875
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions cc/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cf78875

Please sign in to comment.