Chromium Code Reviews| Index: cc/PRESUBMIT.py |
| diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py |
| index fa15632fd457edaa1c6e0ab77cc5568f6f585a64..dbe5cbcfe2467558c975cf184d30bc64cec46821 100644 |
| --- a/cc/PRESUBMIT.py |
| +++ b/cc/PRESUBMIT.py |
| @@ -333,3 +333,32 @@ 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) |
|
Noel Gordon
2015/05/21 06:20:23
original_description -> description ...
mithro-old
2015/05/21 06:25:11
Done.
|
| + if re.search( |
| + r'^CQ_INCLUDE_TRYBOTS=.*', original_description, re.M | re.I): |
|
Noel Gordon
2015/05/21 06:20:23
then close up this line (it should fit on one line
mithro-old
2015/05/21 06:25:11
Done.
|
| + 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 = [] |
| + description = original_description |
|
Noel Gordon
2015/05/21 06:20:23
Write this as:
new_description = description
mithro-old
2015/05/21 06:25:11
Done.
|
| + 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 description != original_description: |
| + rietveld_obj.update_description(issue, description) |
| + |
| + return results |