1 # Copyright 2015 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.
6 def _CommonChecks(input_api
, output_api
):
9 # Run Pylint over the files in the directory.
10 pylint_checks
= input_api
.canned_checks
.GetPylint(input_api
, output_api
)
11 results
.extend(input_api
.RunTests(pylint_checks
))
13 # Run the MB unittests.
14 results
.extend(input_api
.canned_checks
.RunUnitTestsInDirectory(
15 input_api
, output_api
, '.', [ r
'^.+_unittest\.py$']))
20 def CheckChangeOnUpload(input_api
, output_api
):
21 return _CommonChecks(input_api
, output_api
)
24 def CheckChangeOnCommit(input_api
, output_api
):
25 return _CommonChecks(input_api
, output_api
)