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

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: Fixing for review. 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..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
« 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