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