aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorHenrik Kjellander <kjellander@webrtc.org>2015-05-26 19:52:05 +0200
committerHenrik Kjellander <kjellander@webrtc.org>2015-05-26 17:52:10 +0000
commit8d3ad82d30f3634c49af07dad210449721b9d3d1 (patch)
treebcfa417d1c7f7171aab35fb2eb3ed70a577b9ba5 /PRESUBMIT.py
parent5a3ebd761cb2789aa63e4ae7c0035234a3e3b5f3 (diff)
downloadwebrtc-8d3ad82d30f3634c49af07dad210449721b9d3d1.tar.gz
Script for auto-rolling chromium_revision in DEPS.
The previous script only looked up the LKGR and generated a commit message. This CL renames the script and makes it update the DEPS file, commit locally, upload CL and send tryjobs. BUG=4688 R=phoglund@webrtc.org Review URL: https://webrtc-codereview.appspot.com/50079004 Cr-Commit-Position: refs/heads/master@{#9284}
Diffstat (limited to 'PRESUBMIT.py')
-rwxr-xr-xPRESUBMIT.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 619a312e72..6d8f3304dd 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -231,6 +231,25 @@ def _CheckUnwantedDependencies(input_api, output_api):
return results
+def _RunPythonTests(input_api, output_api):
+ def join(*args):
+ return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
+
+ test_directories = [
+ join('tools', 'autoroller', 'unittests'),
+ ]
+
+ tests = []
+ for directory in test_directories:
+ tests.extend(
+ input_api.canned_checks.GetUnitTestsInDirectory(
+ input_api,
+ output_api,
+ directory,
+ whitelist=[r'.+_test\.py$']))
+ return input_api.RunTests(tests, parallel=True)
+
+
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
@@ -277,6 +296,7 @@ def _CommonChecks(input_api, output_api):
results.extend(_CheckNoFRIEND_TEST(input_api, output_api))
results.extend(_CheckGypChanges(input_api, output_api))
results.extend(_CheckUnwantedDependencies(input_api, output_api))
+ results.extend(_RunPythonTests(input_api, output_api))
return results