Chromium Code Reviews| Index: cc/PRESUBMIT.py |
| diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py |
| index fa15632fd457edaa1c6e0ab77cc5568f6f585a64..9ff78c9a53fa80c47fda1190f2d7063edb3a287a 100644 |
| --- a/cc/PRESUBMIT.py |
| +++ b/cc/PRESUBMIT.py |
| @@ -333,3 +333,34 @@ 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 |
| + original_description = rietveld_obj.get_description(issue) |
| + if re.search( |
| + r'^CQ_INCLUDE_TRYBOTS=.*', original_description, re.M | re.I): |
| + return [] |
| + |
| + results = [] |
| + bots = [ |
| + 'linux_blink_rel', |
| + 'mac_blink_rel', |
|
danakj
2015/05/20 21:05:26
Do you think we benefit much from adding mac/win h
mithro-old
2015/05/21 05:26:57
We decided to just use linux_blink_rel for now.
|
| + 'win_blink_rel', |
| + ] |
| + bots = ['tryserver.blink:%s' % s for s in bots] |
| + bots_string = ';'.join(bots) |
| + description = original_description |
| + description += '\nCQ_INCLUDE_TRYBOTS=%s' % bots_string |
| + results.append(output_api.PresubmitNotifyResult( |
| + 'Automatically added Perf trybots to run Blink tests on CQ.')) |
| + |
| + if description != original_description: |
| + rietveld_obj.update_description(issue, description) |
|
Noel Gordon
2015/05/21 05:15:34
nit: indent 2
mithro-old
2015/05/21 05:26:57
Done.
|
| + |
| + return results |