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

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: Rebase onto master. 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..c8506182da1878681437f25297c1886f1995e862 100644
--- a/cc/PRESUBMIT.py
+++ b/cc/PRESUBMIT.py
@@ -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
« 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