summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormithro <mithro@mithis.com>2015-05-21 00:26:32 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-21 07:27:03 +0000
commitcf78875226f38e6add4b9559093bbb4ca2c5c311 (patch)
treea297dcb2d1184bccfa4c5ba43c99a50f2676b7ed
parent8d57a0152613119d7e6369838fd5838fb7773e68 (diff)
downloadchromium_src-cf78875226f38e6add4b9559093bbb4ca2c5c311.zip
chromium_src-cf78875226f38e6add4b9559093bbb4ca2c5c311.tar.gz
chromium_src-cf78875226f38e6add4b9559093bbb4ca2c5c311.tar.bz2
cc: Adding presubmit to include blink tests
Changes in the src/cc directory can often affect the layout tests in Blink however Chromium commit queue doesn't run these tests by default. This leads to breakages being discovered only when the Blink dep is rolled into Chromium. By adding the following line to the CL's description the Blink tests will be run in addition to the normal Chromium tests; CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel BUG=483372 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1142393002 Cr-Commit-Position: refs/heads/master@{#330911}
-rw-r--r--cc/PRESUBMIT.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py
index fa15632..c850618 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