Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4078)

Unified Diff: cc/PRESUBMIT.py

Issue 1142393002: cc: Adding presubmit to include blink tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698