2018-01-16 15:23:32 +00:00
|
|
|
# Copyright 2018 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
|
|
|
|
|
2023-01-12 11:29:30 +00:00
|
|
|
TEST_DIRECTORIES = [
|
|
|
|
'unittests',
|
|
|
|
'builtins-pgo',
|
|
|
|
]
|
|
|
|
|
2022-02-18 10:56:15 +00:00
|
|
|
|
2018-01-16 15:23:32 +00:00
|
|
|
def CheckChangeOnCommit(input_api, output_api):
|
2023-01-12 11:29:30 +00:00
|
|
|
tests = []
|
|
|
|
for directory in TEST_DIRECTORIES:
|
|
|
|
tests += input_api.canned_checks.GetUnitTestsInDirectory(
|
|
|
|
input_api,
|
|
|
|
output_api,
|
|
|
|
directory,
|
|
|
|
files_to_check=[r'.+_test\.py$'],
|
|
|
|
run_on_python2=False)
|
|
|
|
|
2018-01-16 15:23:32 +00:00
|
|
|
return input_api.RunTests(tests)
|