PRESUBMIT.py 834 B

1234567891011121314151617181920212223
  1. # Copyright (c) 2012 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.
  4. """Presubmit script for changes affecting tools/json_schema_compiler/
  5. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
  6. for more details about the presubmit API built into depot_tools.
  7. """
  8. FILE_PATTERN = [ r'.+_test.py$' ]
  9. USE_PYTHON3 = True
  10. def CheckChangeOnUpload(input_api, output_api):
  11. return input_api.canned_checks.RunUnitTestsInDirectory(
  12. input_api, output_api, '.', files_to_check=FILE_PATTERN,
  13. run_on_python2=False)
  14. def CheckChangeOnCommit(input_api, output_api):
  15. return input_api.canned_checks.RunUnitTestsInDirectory(
  16. input_api, output_api, '.', files_to_check=FILE_PATTERN,
  17. run_on_python2=False)