1# Copyright 2019 The PDFium 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"""Presubmit script for PDFium testing tools. 6 7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 8for more details on the presubmit API built into depot_tools. 9""" 10 11USE_PYTHON3 = True 12 13 14def _CommonChecks(input_api, output_api): 15 tests = [] 16 tests.extend( 17 input_api.canned_checks.GetPylint(input_api, output_api, version='2.7')) 18 return tests 19 20 21def CheckChangeOnUpload(input_api, output_api): 22 tests = [] 23 tests.extend(_CommonChecks(input_api, output_api)) 24 return input_api.RunTests(tests) 25 26 27def CheckChangeOnCommit(input_api, output_api): 28 tests = [] 29 tests.extend(_CommonChecks(input_api, output_api)) 30 return input_api.RunTests(tests) 31