1# Copyright (c) 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 script for changes affecting //build/lacros"""
5
6USE_PYTHON3 = True
7
8
9def _CommonChecks(input_api, output_api):
10  tests = input_api.canned_checks.GetUnitTestsInDirectory(
11      input_api,
12      output_api,
13      '.', [r'^.+_test\.py$'],
14      run_on_python2=False,
15      run_on_python3=True,
16      skip_shebang_check=True)
17  return input_api.RunTests(tests)
18
19
20def CheckChangeOnUpload(input_api, output_api):
21  return _CommonChecks(input_api, output_api)
22
23
24def CheckChangeOnCommit(input_api, output_api):
25  return _CommonChecks(input_api, output_api)
26