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

Unified Diff: components/cronet/PRESUBMIT.py

Issue 2440613003: [Cronet] Enforce implementation does not call through API classes (Closed)
Patch Set: add exception for Exception.getMessage() call Created 3 years, 12 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 | components/cronet/android/BUILD.gn » ('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 6ab05a91f194c922e68ff3ddb19d177f299d19ef..e722191e07c99fa73f09c9b18a68280dd9d61689 100644
--- a/components/cronet/PRESUBMIT.py
+++ b/components/cronet/PRESUBMIT.py
@@ -71,15 +71,25 @@ def _PackageChecks(input_api, output_api):
return []
+def _RunUnittests(input_api, output_api):
+ return input_api.canned_checks.RunUnitTestsInDirectory(
+ input_api, output_api, '.', [ r'^.+_unittest\.py$'])
+
+
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_PyLintChecks(input_api, output_api))
results.extend(
input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
results.extend(_PackageChecks(input_api, output_api))
+ results.extend(_RunUnittests(input_api, output_api))
return results
+def CheckChangeOnCommit(input_api, output_api):
+ return _RunUnittests(input_api, output_api)
+
+
def _GetTryMasters(project, change):
return {
'master.tryserver.chromium.android': {
« no previous file with comments | « no previous file | components/cronet/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698