1 # Copyright 2012 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.
5 """Top-level presubmit script for find_runtime_symbols.
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details on the presubmit API built into depot_tools.
14 def CommonChecks(input_api, output_api):
16 return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
19 sys_path_backup = sys.path
22 join('..', 'find_runtime_symbols'),
25 input_api.canned_checks.RunPylint(input_api, output_api, version='2.7'))
27 sys.path = sys_path_backup
30 input_api.canned_checks.RunUnitTestsInDirectory(
33 input_api.os_path.join(input_api.PresubmitLocalPath(), 'tests'),
34 files_to_check=[r'.+_test\.py$']))
38 def CheckChangeOnUpload(input_api, output_api):
39 return CommonChecks(input_api, output_api)
42 def CheckChangeOnCommit(input_api, output_api):
43 return CommonChecks(input_api, output_api)