diff options
author | ilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 03:49:57 +0000 |
---|---|---|
committer | ilevy@chromium.org <ilevy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 03:49:57 +0000 |
commit | e185b7e812655de4178b9f802b9a2ee659c5cd43 (patch) | |
tree | 2ca9a87a0d1f72c945306c49240fc343c5313225 /build/android/PRESUBMIT.py | |
parent | 194ce13e408a54a68091fe7c3c518736a0102ae6 (diff) | |
download | chromium_src-e185b7e812655de4178b9f802b9a2ee659c5cd43.zip chromium_src-e185b7e812655de4178b9f802b9a2ee659c5cd43.tar.gz chromium_src-e185b7e812655de4178b9f802b9a2ee659c5cd43.tar.bz2 |
Move android buildbot test logic into python
Our bash scripts were getting complicated an unwieldy. In this
commit I port the test logic into python, as a precursor to
moving the rest of the file.
I also move the step selection logic into python which offers the following advantages:
- Less files to maintain, easier to change something globally.
- Paves way to moving most factory_properties into 'slave_properties' argument I added. This will let us change parameters like buildtype (make vs. ninja) without a waterfall restart. This also moves configuration into a single place.
Also:
- Refactor test runners to not require envsetup.
- Adding test report step
BUG=153707,163476, 168518
Review URL: https://codereview.chromium.org/11666023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175698 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/PRESUBMIT.py')
-rw-r--r-- | build/android/PRESUBMIT.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/build/android/PRESUBMIT.py b/build/android/PRESUBMIT.py new file mode 100644 index 0000000..c62fac7 --- /dev/null +++ b/build/android/PRESUBMIT.py @@ -0,0 +1,34 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Presubmit script for android buildbot. + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for +details on the presubmit API built into gcl. +""" + +def CommonChecks(input_api, output_api): + output = [] + + def J(*dirs): + """Returns a path relative to presubmit directory.""" + return input_api.os_path.join(input_api.PresubmitLocalPath(), *dirs) + + output.extend(input_api.canned_checks.RunPylint( + input_api, + output_api, + white_list=[r'PRESUBMIT\.py$', r'buildbot/.*\.py$'], + extra_paths_list=[J()])) + + output.extend(input_api.canned_checks.RunUnitTestsInDirectory( + input_api, output_api, J('buildbot', 'tests'))) + return output + + +def CheckChangeOnUpload(input_api, output_api): + return CommonChecks(input_api, output_api) + + +def CheckChangeOnCommit(input_api, output_api): + return CommonChecks(input_api, output_api) |