PRESUBMIT.py 943 B

1234567891011121314151617181920212223
  1. # Copyright 2020 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 for scripts.
  5. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
  6. for more details on the presubmit API built into depot_tools.
  7. """
  8. PRESUBMIT_VERSION = '2.0.0'
  9. USE_PYTHON3 = True
  10. def CheckTests(input_api, output_api):
  11. glob = input_api.os_path.join(
  12. input_api.PresubmitLocalPath(), 'tests', '*_test.py')
  13. tests = input_api.canned_checks.GetUnitTests(input_api,
  14. output_api,
  15. input_api.glob(glob),
  16. run_on_python2=False,
  17. run_on_python3=True,
  18. skip_shebang_check=True)
  19. return input_api.RunTests(tests)