PRESUBMIT.py 782 B

12345678910111213141516171819202122
  1. # Copyright 2015 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. """Top-level presubmit script for testing/merge_scripts.
  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. USE_PYTHON3 = True
  9. def CommonChecks(input_api, output_api):
  10. return input_api.canned_checks.RunUnitTestsInDirectory(
  11. input_api, output_api, '.', [ r'^.+_test\.py$'],
  12. run_on_python2=False, skip_shebang_check=True)
  13. def CheckChangeOnUpload(input_api, output_api):
  14. return CommonChecks(input_api, output_api)
  15. def CheckChangeOnCommit(input_api, output_api):
  16. return CommonChecks(input_api, output_api)