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 5"""Top-level presubmit script for testing/merge_scripts. 6 7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 8for more details about the presubmit API built into depot_tools. 9""" 10 11def CommonChecks(input_api, output_api): 12 return input_api.canned_checks.RunUnitTestsInDirectory( 13 input_api, output_api, '.', [ r'^.+_test\.py$']) 14 15def CheckChangeOnUpload(input_api, output_api): 16 return CommonChecks(input_api, output_api) 17 18def CheckChangeOnCommit(input_api, output_api): 19 return CommonChecks(input_api, output_api) 20