2017-03-14 16:06:31 +00: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-02-18 10:56:15 +00: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-09-01 11:41:17 +00:00
|
|
|
def _CommonChecks(input_api, output_api):
|
2017-03-14 16:06:31 +00:00
|
|
|
tests = input_api.canned_checks.GetUnitTestsInDirectory(
|
2022-03-15 10:43:19 +00:00
|
|
|
input_api, output_api, '.', files_to_check=['test_scripts.py$'],
|
|
|
|
run_on_python2=False)
|
2017-03-14 16:06:31 +00:00
|
|
|
return input_api.RunTests(tests)
|
2021-09-01 11:41:17 +00: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)
|