Commit 1e9ae916 authored by zhaoyangli's avatar zhaoyangli Committed by Commit Bot

[code coverage] Forward use_clang_coverage arg to iOS test runner scripts.

This change will forward the build arg to iOS test runner scripts. CL
changing how test runner scripts are consuming this arg is at
crrev/c/2092941.

Bug: 943883
Change-Id: I4f52cf5fcc83cdca75570c812fd1c0629a96f4ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2099479Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749729}
parent 15be213c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/coverage/coverage.gni")
import("//build/config/ios/ios_sdk.gni") import("//build/config/ios/ios_sdk.gni")
import("//build/config/ios/ios_test_runner_config.gni") import("//build/config/ios/ios_test_runner_config.gni")
import("//build/util/generate_wrapper.gni") import("//build/util/generate_wrapper.gni")
...@@ -93,6 +94,10 @@ template("ios_test_runner_wrapper") { ...@@ -93,6 +94,10 @@ template("ios_test_runner_wrapper") {
"${shards}", "${shards}",
] ]
if (use_clang_coverage) {
executable_args += [ "--use-clang-coverage" ]
}
# test runner relies on iossim if use_ios_simulator (defined in ios_sdk.gni) # test runner relies on iossim if use_ios_simulator (defined in ios_sdk.gni)
if (use_ios_simulator) { if (use_ios_simulator) {
_rebased_root_build_dir = rebase_path("${root_build_dir}", root_build_dir) _rebased_root_build_dir = rebase_path("${root_build_dir}", root_build_dir)
......
...@@ -349,6 +349,11 @@ class Runner(): ...@@ -349,6 +349,11 @@ class Runner():
'will be excluded from this run. If unspecified, run all tests.'), 'will be excluded from this run. If unspecified, run all tests.'),
metavar='testcase', metavar='testcase',
) )
parser.add_argument(
'--use-clang-coverage',
help='Enable code coverage related steps in test runner scripts.',
action='store_true',
)
parser.add_argument( parser.add_argument(
'--use-trusted-cert', '--use-trusted-cert',
action='store_true', action='store_true',
...@@ -405,7 +410,6 @@ class Runner(): ...@@ -405,7 +410,6 @@ class Runner():
args.restart = args_json.get('restart', args.restart) args.restart = args_json.get('restart', args.restart)
args.test_cases = args.test_cases or [] args.test_cases = args.test_cases or []
args.test_cases.extend(args_json.get('test_cases', [])) args.test_cases.extend(args_json.get('test_cases', []))
args.use_clang_coverage = args_json.get('use_clang_coverage', False)
args.xctest = args_json.get('xctest', args.xctest) args.xctest = args_json.get('xctest', args.xctest)
args.xcode_parallelization = args_json.get('xcode_parallelization', args.xcode_parallelization = args_json.get('xcode_parallelization',
args.xcode_parallelization) args.xcode_parallelization)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment