2017-06-06 10:28:14 +02:00
|
|
|
# Copyright 2017 the V8 project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2022-04-12 11:10:15 +02:00
|
|
|
# This line is 'magic' in that git-cl looks for it to decide whether to
|
|
|
|
# use Python3 instead of Python2 when running the code in this file.
|
|
|
|
USE_PYTHON3 = True
|
|
|
|
|
|
|
|
|
2021-10-10 11:10:43 +02:00
|
|
|
def _CommonChecks(input_api, output_api):
|
2017-06-06 10:28:14 +02:00
|
|
|
tests = input_api.canned_checks.GetUnitTestsInDirectory(
|
2022-04-12 11:10:15 +02:00
|
|
|
input_api, output_api, '.', files_to_check=['test_scripts.py$'],
|
|
|
|
run_on_python2=False)
|
2017-06-06 10:28:14 +02:00
|
|
|
return input_api.RunTests(tests)
|
2021-10-10 11:10:43 +02:00
|
|
|
|
|
|
|
def CheckChangeOnUpload(input_api, output_api):
|
|
|
|
return _CommonChecks(input_api, output_api)
|
|
|
|
|
|
|
|
def CheckChangeOnCommit(input_api, output_api):
|
|
|
|
return _CommonChecks(input_api, output_api)
|