1# Copyright 2015 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4"""Top-level presubmit script for testing/trigger_scripts. 5 6See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7for more details about the presubmit API built into depot_tools. 8""" 9 10 11def CommonChecks(input_api, output_api): 12 return input_api.canned_checks.RunUnitTestsInDirectory( 13 input_api, output_api, '.', files_to_check=['.*test.py']) 14 15 16def CheckChangeOnUpload(input_api, output_api): 17 return CommonChecks(input_api, output_api) 18 19 20def CheckChangeOnCommit(input_api, output_api): 21 return CommonChecks(input_api, output_api) 22