1 # Copyright 2014 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.
5 def CommonChecks(input_api
, output_api
):
7 output
.extend(input_api
.canned_checks
.RunPylint(input_api
, output_api
))
8 output
.extend(input_api
.canned_checks
.RunUnitTestsInDirectory(
11 input_api
.PresubmitLocalPath(),
12 whitelist
=[r
'^.+_unittest\.py$']))
16 def CheckChangeOnUpload(input_api
, output_api
):
17 return CommonChecks(input_api
, output_api
)
20 def CheckChangeOnCommit(input_api
, output_api
):
21 return CommonChecks(input_api
, output_api
)