• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 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.
4
5"""Presubmit script for testing/merge_scripts/code_coverage.
6
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details about the presubmit API built into depot_tools.
9"""
10
11USE_PYTHON3 = True
12
13def CommonChecks(input_api, output_api):
14  return input_api.canned_checks.RunUnitTestsInDirectory(
15      input_api,
16      output_api,
17      '.',
18      [ r'^.+_test\.py$'],
19      run_on_python2=not USE_PYTHON3,
20      run_on_python3=USE_PYTHON3,
21      skip_shebang_check=True)
22
23def CheckChangeOnUpload(input_api, output_api):
24  return CommonChecks(input_api, output_api)
25
26def CheckChangeOnCommit(input_api, output_api):
27  return CommonChecks(input_api, output_api)
28