blob: bce5429b9ddf8b1fd79dde63c1260db68ad8a87a [file] [log] [blame]
[email protected]e615e9c2012-03-07 21:39:001# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5"""Top-level presubmit script for testing.
6
tfarina78bb92f42015-01-31 00:20:487See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details on the presubmit API built into depot_tools.
[email protected]e615e9c2012-03-07 21:39:009"""
10
11
12def CommonChecks(input_api, output_api):
13 output = []
Ilia Samsonova00835302019-04-19 17:37:5914 output.extend(input_api.canned_checks.RunUnitTestsInDirectory(
15 input_api, output_api, '.', [r'^.+_unittest\.py$']))
[email protected]e615e9c2012-03-07 21:39:0016 output.extend(input_api.canned_checks.RunPylint(
Ben Pastene4b514ab2020-09-16 01:07:1317 input_api, output_api, files_to_skip=[r'gmock.*', r'gtest.*']))
[email protected]e615e9c2012-03-07 21:39:0018 return output
19
20
21def CheckChangeOnUpload(input_api, output_api):
22 return CommonChecks(input_api, output_api)
23
24
25def CheckChangeOnCommit(input_api, output_api):
26 return CommonChecks(input_api, output_api)