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

Unified Diff: components/cronet/PRESUBMIT.py

Issue 2683103002: Rewrite presubmit scripts to use new EnsureCQIncludeTrybotsAreAdded. (Closed)
Patch Set: Worked around unrelated presubmit failure under cronet. Created 3 years, 10 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 | « chrome_elf/PRESUBMIT.py ('k') | components/cronet/android/test/javaperftests/run.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/PRESUBMIT.py
diff --git a/components/cronet/PRESUBMIT.py b/components/cronet/PRESUBMIT.py
index 59aaafa49f4a6180ef086fc2893d25d6962cd303..e89d975b54c5f97a0aa6abd59b48def8010029e8 100644
--- a/components/cronet/PRESUBMIT.py
+++ b/components/cronet/PRESUBMIT.py
@@ -8,9 +8,6 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
-import re
-
-
def _PyLintChecks(input_api, output_api):
pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api,
extra_paths_list=_GetPathsToPrepend(input_api), pylintrc='pylintrc')
@@ -111,21 +108,9 @@ def PostUploadHook(cl, change, output_api):
This hook adds an extra try bot to the CL description in order to run Cronet
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 []
-
- masters = _GetTryMasters(None, change)
- results = []
- new_description = description
- new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(
- '%s:%s' % (master, ','.join(bots))
- for master, bots in masters.iteritems())
- results.append(output_api.PresubmitNotifyResult(
- 'Automatically added Cronet trybot to run tests on CQ.'))
-
- rietveld_obj.update_description(issue, new_description)
-
- return results
+ return output_api.EnsureCQIncludeTrybotsAreAdded(
+ cl,
+ [
+ 'master.tryserver.chromium.android:android_cronet_tester',
+ ],
+ 'Automatically added Cronet trybot to run tests on CQ.')
« no previous file with comments | « chrome_elf/PRESUBMIT.py ('k') | components/cronet/android/test/javaperftests/run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698