forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPRESUBMIT.py
47 lines (36 loc) · 1.36 KB
/
PRESUBMIT.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for ios test runner scripts.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
USE_PYTHON3 = True
def _RunTestRunnerUnitTests(input_api, output_api):
""" Runs iOS test runner unit tests """
# TODO(crbug.com/1056457): Replace the list with regex ".*_test.py" once
# all test files are fixed.
files = [
'file_util_test.py',
'iossim_util_test.py',
'result_sink_util_test.py',
'run_test.py',
'shard_util_test.py',
'standard_json_util_test.py',
'test_apps_test.py',
# 'test_runner_test.py',
'wpr_runner_test.py',
'xcode_log_parser_test.py',
'xcode_util_test.py',
# 'xcodebuild_runner_test.py',
]
return input_api.canned_checks.RunUnitTestsInDirectory(
input_api, output_api, '.', files_to_check=files)
def CheckChange(input_api, output_api):
results = []
results.extend(_RunTestRunnerUnitTests(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api):
return CheckChange(input_api, output_api)
def CheckChangeOnUpload(input_api, output_api):
return CheckChange(input_api, output_api)