[go: nahoru, domu]

blob: a191185c32da9be10c7695d1ac78c5a8a4e39700 [file] [log] [blame]
qsrc6c612c2015-01-13 22:07:481# Copyright 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
qsrfb5251d12015-01-21 15:57:224
5# ==============================================================================
6# TEST SETUP
7# ==============================================================================
8
Yuke Liao2a9b2f0e2021-04-16 00:40:119import("//build/config/chromeos/args.gni")
Yuke Liaoe703384b2020-07-16 01:05:2410import("//build/config/chromeos/ui_mode.gni")
Kevin Marshall36c602c2021-11-04 16:16:2111import("//build/config/devtools.gni")
Dirk Prankeb404c3b2021-06-14 19:57:5012import("//build/config/gclient_args.gni")
Greg Guterman28b3cba2021-05-12 22:21:0313import("//build/config/rts.gni")
Mirko Bonadei4a0df432020-09-08 19:06:0214import("//build_overrides/build.gni")
Yuke Liaoe703384b2020-07-16 01:05:2415
Greg Guterman6963dc02021-04-07 05:20:5916declare_args() {
Dirk Prankeb404c3b2021-06-14 19:57:5017 # Some component repos (e.g. ANGLE) import //testing but do not have
18 # "location_tags.json", and so we don't want to try and upload the tags
19 # for their tests.
20 # And, some build configs may simply turn off generation altogether.
21 tests_have_location_tags = generate_location_tags
Greg Guterman6963dc02021-04-07 05:20:5922}
23
jcivellif4462a352017-01-10 04:45:5924if (is_android) {
25 import("//build/config/android/config.gni")
Charlie Hud98dc692021-12-08 01:01:0226 import("//build/config/android/create_unwind_table.gni")
James Cook209256f2018-12-07 18:40:5027 import("//build/config/android/extract_unwind_tables.gni")
jcivellif4462a352017-01-10 04:45:5928 import("//build/config/android/rules.gni")
Abhishek Arya2f5f7342018-06-13 16:59:4429 import("//build/config/sanitizers/sanitizers.gni")
Dirk Prankedd4ff742020-11-18 19:57:3230} else if (is_fuchsia) {
Kevin Marshall184e9092018-02-07 21:09:0631 import("//build/config/chromecast_build.gni")
Kevin Marshall55fd8522019-10-04 22:47:0132 import("//build/config/fuchsia/generate_runner_scripts.gni")
Kevin Marshallf35fa5f2018-01-29 19:24:4233 import("//build/config/fuchsia/package.gni")
Chong Gu26908f42021-01-29 03:13:0734 import("//third_party/fuchsia-sdk/sdk/build/cmc.gni")
Yuke Liaoe502a742021-04-19 23:15:0235} else if ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device) {
Ben Pastene4c35c572018-04-30 23:21:4836 import("//build/config/chromeos/rules.gni")
Dirk Prankedd4ff742020-11-18 19:57:3237 import("//build/config/sanitizers/sanitizers.gni")
Dirk Pranke6188075b2020-10-01 19:31:2838 import("//build/util/generate_wrapper.gni")
Dirk Prankedd4ff742020-11-18 19:57:3239} else if (is_ios) {
Jeff Yoonf7f4eb42020-03-06 18:55:3640 import("//build/config/ios/ios_sdk.gni")
41 import("//build/config/ios/ios_test_runner_wrapper.gni")
42 import("//build/config/ios/rules.gni")
Dirk Prankedd4ff742020-11-18 19:57:3243} else {
Dirk Pranke31e346e2020-07-15 00:54:0644 import("//build/config/sanitizers/sanitizers.gni")
45 import("//build/util/generate_wrapper.gni")
46}
47
qsrfb5251d12015-01-21 15:57:2248# Define a test as an executable (or apk on Android) with the "testonly" flag
49# set.
agrieve62ab00282016-04-05 02:03:4550# Variable:
Dirk Pranke79d065d2020-08-29 03:28:3051# use_xvfb: (optional) whether to run the executable under Xvfb.
agrieve62ab00282016-04-05 02:03:4552# use_raw_android_executable: Use executable() rather than android_apk().
ynovikov389d9e442016-05-27 02:34:5653# use_native_activity: Test implements ANativeActivity_onCreate().
Mirko Bonadei15522bc2020-09-16 20:38:3954# is_xctest: (iOS, optional) whether to build the executable as XCTest.
55# Similar to the GN arg 'enable_run_ios_unittests_with_xctest' but
56# for build targets.
Stefano Duo4128b6b2021-08-02 21:24:4357# allow_cleartext_traffic: (Android, optional) whether to allow cleartext
58# network requests during the test.
qsrfb5251d12015-01-21 15:57:2259template("test") {
Greg Guterman6963dc02021-04-07 05:20:5960 # Ensures the rts file exists and if not, creates a dummy file
61 if (use_rts) {
62 action("${target_name}__rts_filters") {
63 script = "//build/add_rts_filters.py"
Greg Guterman49a42172021-04-08 22:04:5364 rts_file = "${root_build_dir}/gen/rts/${invoker.target_name}.filter"
Greg Guterman6963dc02021-04-07 05:20:5965 args = [ rebase_path(rts_file, root_build_dir) ]
66 outputs = [ rts_file ]
67 }
68 }
69
Andrew Grieve1b290e4a22020-11-24 20:07:0170 testonly = true
Mirko Bonadei15522bc2020-09-16 20:38:3971 if (!is_ios) {
72 assert(!defined(invoker.is_xctest) || !invoker.is_xctest,
73 "is_xctest can be set only for iOS builds")
74 }
Stefano Duo4128b6b2021-08-02 21:24:4375 if (!is_android) {
76 assert(!defined(invoker.allow_cleartext_traffic),
77 "allow_cleartext_traffic can be set only for Android tests")
78 }
79
qsrfb5251d12015-01-21 15:57:2280 if (is_android) {
Dirk Pranke79d065d2020-08-29 03:28:3081 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
82
Peter Kotwicz10742f82021-04-15 22:32:5083 _use_default_launcher =
84 !defined(invoker.use_default_launcher) || invoker.use_default_launcher
85 if (!defined(invoker.use_raw_android_executable)) {
86 # Checkouts where build_with_chromium == false often have a custom GN
87 # template wrapper around test() which sets use_default_launcher == false.
88 # Set the _use_raw_android_executable default so that test() targets which
89 # do not use the custom wrapper
90 # (1) Do not cause "gn gen" to fail
91 # (2) Do not need to be moved into if(build_with_chromium) block.
92 _use_raw_android_executable =
93 !build_with_chromium && _use_default_launcher
94 } else {
95 not_needed([ "_use_default_launcher" ])
96 _use_raw_android_executable = invoker.use_raw_android_executable
97 }
qsrfb5251d12015-01-21 15:57:2298
agrieve67855de2016-03-30 14:46:0199 # output_name is used to allow targets with the same name but in different
100 # packages to still produce unique runner scripts.
101 _output_name = invoker.target_name
mikecase56d80d72015-06-03 00:57:26102 if (defined(invoker.output_name)) {
agrieve67855de2016-03-30 14:46:01103 _output_name = invoker.output_name
mikecase56d80d72015-06-03 00:57:26104 }
agrieve62ab00282016-04-05 02:03:45105
agrieveb355ad152016-04-19 03:45:23106 _test_runner_target = "${_output_name}__test_runner_script"
jbudorickd29ecfa72016-11-18 22:45:42107 _wrapper_script_vars = [
agrievee41ae1902016-04-25 14:12:51108 "ignore_all_data_deps",
jbudorickd29ecfa72016-11-18 22:45:42109 "shard_timeout",
agrievee41ae1902016-04-25 14:12:51110 ]
agrieve3ac557f02016-04-12 15:52:00111
jbudorickced2a252016-06-09 16:38:54112 assert(_use_raw_android_executable || enable_java_templates)
113
agrieve62ab00282016-04-05 02:03:45114 if (_use_raw_android_executable) {
Peter Kotwicz13a827a62021-04-22 22:34:49115 not_needed(invoker, [ "add_unwind_tables_in_apk" ])
116
agrieve62ab00282016-04-05 02:03:45117 _exec_target = "${target_name}__exec"
118 _dist_target = "${target_name}__dist"
119 _exec_output =
120 "$target_out_dir/${invoker.target_name}/${invoker.target_name}"
121
122 executable(_exec_target) {
123 # Configs will always be defined since we set_defaults in BUILDCONFIG.gn.
124 configs = []
Dirk Pranke19a58732021-03-24 22:26:22125 forward_variables_from(
126 invoker,
127 "*",
128 TESTONLY_AND_VISIBILITY + _wrapper_script_vars + [
129 "data_deps",
130 "extra_dist_files",
131 ])
agrieve62ab00282016-04-05 02:03:45132
133 # Thanks to the set_defaults() for test(), configs are initialized with
134 # the default shared_library configs rather than executable configs.
Thomas Anderson11c1d9822019-01-15 06:32:59135 configs -= [
136 "//build/config:shared_library_config",
137 "//build/config/android:hide_all_but_jni",
138 ]
agrieve62ab00282016-04-05 02:03:45139 configs += [ "//build/config:executable_config" ]
140
Dirk Pranke19a58732021-03-24 22:26:22141 if (defined(invoker.data_deps)) {
142 data_deps = invoker.data_deps
143 } else {
144 data_deps = []
145 }
146 if (!defined(data)) {
147 data = []
148 }
Jamie Madilldd60ee62021-04-13 19:25:52149 if (tests_have_location_tags) {
150 data += [ "//testing/location_tags.json" ]
151 }
Dirk Pranke19a58732021-03-24 22:26:22152
agrieve62ab00282016-04-05 02:03:45153 # Don't output to the root or else conflict with the group() below.
154 output_name = rebase_path(_exec_output, root_out_dir)
Greg Guterman50ed4b42021-04-08 01:15:11155
156 if (use_rts) {
157 data_deps += [ ":${invoker.target_name}__rts_filters" ]
158 }
agrieve62ab00282016-04-05 02:03:45159 }
160
161 create_native_executable_dist(_dist_target) {
agrieve62ab00282016-04-05 02:03:45162 dist_dir = "$root_out_dir/$target_name"
163 binary = _exec_output
Nico Weber852532f2020-01-28 18:17:22164 deps = [ ":$_exec_target" ]
agrieve62ab00282016-04-05 02:03:45165 if (defined(invoker.extra_dist_files)) {
166 extra_files = invoker.extra_dist_files
167 }
Greg Guterman50ed4b42021-04-08 01:15:11168
169 if (use_rts) {
170 if (!defined(data_deps)) {
171 data_deps = []
172 }
173 data_deps += [ ":${invoker.target_name}__rts_filters" ]
174 }
agrieve62ab00282016-04-05 02:03:45175 }
176 } else {
Andrew Grievec61b8dff2019-10-21 16:32:02177 _library_target = "${target_name}__library"
178 _apk_target = "${target_name}__apk"
agrieve62ab00282016-04-05 02:03:45179 _apk_specific_vars = [
Stefano Duo4128b6b2021-08-02 21:24:43180 "allow_cleartext_traffic",
agrieve62ab00282016-04-05 02:03:45181 "android_manifest",
agrievec6811b422016-06-23 02:25:09182 "android_manifest_dep",
Peter Kotwiczab1b5422021-03-30 22:58:27183 "android_manifest_template",
Clark DuVall1bee5322020-06-10 05:51:55184 "app_as_shared_lib",
agrieve62ab00282016-04-05 02:03:45185 "enable_multidex",
Peter Kotwicz10742f82021-04-15 22:32:50186 "generate_final_jni",
Benoît Lizéd8b8f742019-11-07 12:50:07187 "product_config_java_packages",
Tibor Goldschwendt95db95d2019-06-17 20:32:02188 "min_sdk_version",
huapenglc35ba6e2016-05-25 23:08:07189 "proguard_configs",
190 "proguard_enabled",
Fred Mello0cc91c62019-08-24 01:53:45191 "srcjar_deps",
Tibor Goldschwendt95db95d2019-06-17 20:32:02192 "target_sdk_version",
agrieve62ab00282016-04-05 02:03:45193 "use_default_launcher",
ynovikov389d9e442016-05-27 02:34:56194 "use_native_activity",
agrieve62ab00282016-04-05 02:03:45195 ]
Siddhartha764226b2018-03-13 02:32:55196
197 # Adds the unwind tables from unstripped binary as an asset file in the
198 # apk, if |add_unwind_tables_in_apk| is specified by the test.
199 if (defined(invoker.add_unwind_tables_in_apk) &&
200 invoker.add_unwind_tables_in_apk) {
201 _unwind_table_asset_name = "${target_name}_unwind_assets"
Charlie Hud98dc692021-12-08 01:01:02202 if (use_android_unwinder_v2) {
203 unwind_table_asset_v2(_unwind_table_asset_name) {
204 library_target = _library_target
205 deps = [ ":$_library_target" ]
206 }
207 } else {
208 unwind_table_asset(_unwind_table_asset_name) {
209 library_target = _library_target
210 deps = [ ":$_library_target" ]
211 }
Siddhartha764226b2018-03-13 02:32:55212 }
213 }
214
agrieve62ab00282016-04-05 02:03:45215 shared_library(_library_target) {
216 # Configs will always be defined since we set_defaults in BUILDCONFIG.gn.
217 configs = [] # Prevent list overwriting warning.
218 configs = invoker.configs
agrieve62ab00282016-04-05 02:03:45219
jbudorickd29ecfa72016-11-18 22:45:42220 forward_variables_from(
221 invoker,
222 "*",
Peter Wen2052bd12020-12-03 20:15:07223 [ "deps" ] + _apk_specific_vars + _wrapper_script_vars +
224 TESTONLY_AND_VISIBILITY)
225
226 # Native targets do not need to depend on java targets. Filter them out
227 # so that the shared library can be built without needing to wait for
228 # dependent java targets.
229 deps = []
230 if (defined(invoker.deps)) {
231 foreach(_dep, invoker.deps) {
232 _target_label = get_label_info(_dep, "label_no_toolchain")
233 if (filter_exclude([ _target_label ], java_target_patterns) != []) {
234 deps += [ _dep ]
235 }
236 }
237 }
agrieve62ab00282016-04-05 02:03:45238
Peter Kotwiczb9957d62021-04-12 21:09:43239 if (_use_default_launcher) {
Tom Andersonce772fa2018-05-30 22:20:37240 deps += [ "//testing/android/native_test:native_test_native_code" ]
agrieve62ab00282016-04-05 02:03:45241 }
242 }
243 unittest_apk(_apk_target) {
Daniel Bratellfdda4652019-01-31 15:45:54244 forward_variables_from(invoker, _apk_specific_vars)
agrieve48bd27e2016-06-22 21:04:07245 shared_library = ":$_library_target"
agrieve62ab00282016-04-05 02:03:45246 apk_name = invoker.target_name
247 if (defined(invoker.output_name)) {
248 apk_name = invoker.output_name
agrieve62ab00282016-04-05 02:03:45249 install_script_name = "install_${invoker.output_name}"
250 }
agrieveb355ad152016-04-19 03:45:23251
Daniel Bratellfdda4652019-01-31 15:45:54252 if (defined(invoker.deps)) {
253 deps = invoker.deps
254 } else {
255 deps = []
256 }
257
jcivellif4462a352017-01-10 04:45:59258 # Add the Java classes so that each target does not have to do it.
Peter Kotwiczb9957d62021-04-12 21:09:43259 if (_use_default_launcher) {
260 deps += [ "//base/test:test_support_java" ]
261 }
jcivellif4462a352017-01-10 04:45:59262
Siddhartha764226b2018-03-13 02:32:55263 if (defined(_unwind_table_asset_name)) {
264 deps += [ ":${_unwind_table_asset_name}" ]
265 }
Greg Guterman50ed4b42021-04-08 01:15:11266
267 if (use_rts) {
268 data_deps = [ ":${invoker.target_name}__rts_filters" ]
269 }
agrieve62ab00282016-04-05 02:03:45270 }
Andrew Grievee1dc23f2019-10-22 16:26:36271 }
agrieve62ab00282016-04-05 02:03:45272
Andrew Grievee1dc23f2019-10-22 16:26:36273 test_runner_script(_test_runner_target) {
274 forward_variables_from(invoker, _wrapper_script_vars)
estevensonce844392016-12-15 19:57:57275
Andrew Grievee1dc23f2019-10-22 16:26:36276 if (_use_raw_android_executable) {
277 executable_dist_dir = "$root_out_dir/$_dist_target"
John Budorickd5dccb22020-02-01 02:16:34278 data_deps = [ ":$_exec_target" ]
Andrew Grievee1dc23f2019-10-22 16:26:36279 } else {
280 apk_target = ":$_apk_target"
281 incremental_apk = incremental_install
Andrew Grieve7ca6de32019-10-18 03:57:47282
283 # Dep needed for the test runner .runtime_deps file to pick up data
284 # deps from the forward_variables_from(invoker, "*") on the library.
Nico Weber852532f2020-01-28 18:17:22285 data_deps = [ ":$_library_target" ]
agrieve62ab00282016-04-05 02:03:45286 }
Andrew Grievee1dc23f2019-10-22 16:26:36287 test_name = _output_name
288 test_suite = _output_name
289 test_type = "gtest"
Greg Guterman6963dc02021-04-07 05:20:59290
291 if (use_rts) {
292 data_deps += [ ":${invoker.target_name}__rts_filters" ]
293 }
mikecase56d80d72015-06-03 00:57:26294 }
295
Andrew Grieve7ca6de32019-10-18 03:57:47296 # Create a wrapper script rather than using a group() in order to ensure
297 # "ninja $target_name" always works. If this was a group(), then GN would
298 # not create a top-level alias for it if a target exists in another
299 # directory with the same $target_name.
300 # Also - bots run this script directly for "components_perftests".
301 generate_wrapper(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01302 forward_variables_from(invoker, [ "visibility" ])
Andrew Grieve7ca6de32019-10-18 03:57:47303 executable = "$root_build_dir/bin/run_$_output_name"
304 wrapper_script = "$root_build_dir/$_output_name"
Nico Weber852532f2020-01-28 18:17:22305 deps = [ ":$_test_runner_target" ]
jbudorick686094f62017-05-04 21:52:40306 if (_use_raw_android_executable) {
Andrew Grieve7ca6de32019-10-18 03:57:47307 deps += [ ":$_dist_target" ]
jbudorick686094f62017-05-04 21:52:40308 } else {
Andrew Grieve7ca6de32019-10-18 03:57:47309 # Dep needed for the swarming .isolate file to pick up data
310 # deps from the forward_variables_from(invoker, "*") on the library.
311 deps += [
312 ":$_apk_target",
313 ":$_library_target",
314 ]
agrieve62ab00282016-04-05 02:03:45315 }
Dirk Pranke19a58732021-03-24 22:26:22316
317 if (defined(invoker.data_deps)) {
318 data_deps = invoker.data_deps
319 } else {
320 data_deps = []
321 }
Jamie Madilldd60ee62021-04-13 19:25:52322 if (tests_have_location_tags) {
323 data = [ "//testing/location_tags.json" ]
324 }
Greg Guterman6963dc02021-04-07 05:20:59325
326 if (use_rts) {
327 data_deps += [ ":${invoker.target_name}__rts_filters" ]
328 }
agrieve1a02e582015-10-15 21:35:39329 }
Scott Graham4c4cdc52017-05-29 20:45:03330 } else if (is_fuchsia) {
Dirk Pranke79d065d2020-08-29 03:28:30331 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
332
Scott Graham4c4cdc52017-05-29 20:45:03333 _output_name = invoker.target_name
Kevin Marshallf35fa5f2018-01-29 19:24:42334 _pkg_target = "${_output_name}_pkg"
Kevin Marshallf35fa5f2018-01-29 19:24:42335 _exec_target = "${_output_name}__exec"
Scott Graham4c4cdc52017-05-29 20:45:03336
Chong Gu17922692021-12-07 19:03:50337 # Generate a CMX fragment that provides the program name.
338 _test_program_fragment_target = "${target_name}_program-fragment"
339 _test_program_fragment = "${target_out_dir}/${target_name}_program.test-cmx"
340 _program_name = get_label_info(":${_exec_target}", "name")
341 generated_file(_test_program_fragment_target) {
342 contents = "{ \"program\": { \"binary\": \"${_program_name}\"}}"
343 outputs = [ _test_program_fragment ]
Wez6879f8a2021-09-07 20:27:02344 }
Chong Gu26908f42021-01-29 03:13:07345
Chong Gu17922692021-12-07 19:03:50346 # Collate the complete set of elements to include in the test component's
347 # manifest.
348 _manifest_fragments = [
349 "//build/config/fuchsia/test/minimum_capabilities.test-cmx",
350 _test_program_fragment,
351 ]
Chong Gu91a1fea2021-03-30 17:24:31352 if (defined(invoker.additional_manifest_fragments)) {
Wez6879f8a2021-09-07 20:27:02353 _manifest_fragments += invoker.additional_manifest_fragments
Chong Guacf19a32021-03-10 01:07:41354 }
Chong Gu28bf7e72021-05-26 01:36:19355
Wez6879f8a2021-09-07 20:27:02356 # Generate the test component manifest from the specified elements.
357 _test_component_manifest_target = "${target_name}_component-manifest"
Chong Gu17922692021-12-07 19:03:50358 _test_component_manifest = "${target_out_dir}/${target_name}.cmx"
Wez6879f8a2021-09-07 20:27:02359 cmc_merge(_test_component_manifest_target) {
360 sources = _manifest_fragments
Chong Gu17922692021-12-07 19:03:50361 output_name = "${_output_name}.cmx"
Wez6879f8a2021-09-07 20:27:02362 deps = [ ":${_test_program_fragment_target}" ]
Chong Gu7ad57c22021-03-11 00:24:38363 }
Chong Gu26908f42021-01-29 03:13:07364
Wez6879f8a2021-09-07 20:27:02365 # Define the test component, dependent on the generated manifest, and the
366 # test executable target.
367 _test_component_target = "${target_name}_component"
368 fuchsia_component(_test_component_target) {
369 deps = [ ":$_test_component_manifest_target" ]
370 data_deps = [ ":$_exec_target" ]
371 manifest = _test_component_manifest
372 visibility = [ ":*" ]
373 }
374
375 # Define components for each entry in |additional_manifests|, if any. Since
376 # manifests may themselves depend-on the outputs of |deps|, these components
377 # must each individually depend on |invoker.deps|.
378 _test_component_targets = [ ":${_test_component_target}" ]
379 if (defined(invoker.additional_manifests)) {
380 foreach(filename, invoker.additional_manifests) {
381 _additional_component_target =
382 target_name + "_" + get_path_info(filename, "name")
383 _test_component_targets += [ ":${_additional_component_target}" ]
384 fuchsia_component(_additional_component_target) {
385 forward_variables_from(invoker, [ "testonly" ])
386 data_deps = [ ":$_exec_target" ]
387 visibility = [ ":*" ]
388 manifest = filename
389
390 # Depend on |invoker.deps|, in case it includes a dependency that
391 # creates this additional component's manifest.
392 if (defined(invoker.deps)) {
393 deps = invoker.deps
394 }
395 }
396 }
397 }
398
399 # Define the package target that will bundle the test and additional
400 # components and their data.
401 fuchsia_package(_pkg_target) {
Kevin Marshall36c602c2021-11-04 16:16:21402 forward_variables_from(invoker,
403 [
404 "excluded_files",
405 "excluded_dirs",
406 ])
Wez6879f8a2021-09-07 20:27:02407 package_name = _output_name
408 deps = _test_component_targets
Kevin Marshall36c602c2021-11-04 16:16:21409
410 if (!defined(excluded_dirs)) {
411 excluded_dirs = []
412 }
413 excluded_dirs += [ devtools_root_location ]
Wez6879f8a2021-09-07 20:27:02414 }
415
416 # |target_name| refers to the package-runner rule, so that building
417 # "base_unittests" will build not only the executable, component, and
418 # package, but also the script required to run them.
Kevin Marshall5fadadd2021-10-16 00:08:25419 fuchsia_test_runner(target_name) {
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53420 forward_variables_from(invoker,
421 [
Kevin Marshall5fadadd2021-10-16 00:08:25422 "data",
423 "data_deps",
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53424 "package_deps",
Kevin Marshall5fadadd2021-10-16 00:08:25425 "use_test_server",
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53426 ])
Kevin Marshall5fadadd2021-10-16 00:08:25427
Chong Guc6bfdf62021-10-20 23:37:00428 is_test_exe = true
Kevin Marshall39b4aa82018-06-23 00:12:15429 package = ":$_pkg_target"
Kevin Marshall5fadadd2021-10-16 00:08:25430 package_name = _output_name
Dimitri Glazkovc95e6dd2018-08-24 23:39:42431
Kevin Marshall5fadadd2021-10-16 00:08:25432 if (!defined(deps)) {
433 deps = []
Jamie Madilldd60ee62021-04-13 19:25:52434 }
Kevin Marshall5fadadd2021-10-16 00:08:25435 if (defined(invoker.deps)) {
436 deps += invoker.deps
437 }
Greg Guterman6963dc02021-04-07 05:20:59438
Kevin Marshall5fadadd2021-10-16 00:08:25439 if (!defined(data)) {
440 data = []
441 }
442 if (tests_have_location_tags) {
443 data += [ "//testing/location_tags.json" ]
444 }
445
446 if (!defined(data_deps)) {
447 data_deps = []
448 }
Chong Guc6bfdf62021-10-20 23:37:00449 data_deps += [ "//testing/buildbot/filters:fuchsia_filters" ]
Chong Gu258e22c2021-10-20 18:39:50450
Greg Guterman6963dc02021-04-07 05:20:59451 if (use_rts) {
Kevin Marshall5fadadd2021-10-16 00:08:25452 data_deps += [ ":${target_name}__rts_filters" ]
Greg Guterman6963dc02021-04-07 05:20:59453 }
Kevin Marshallf35fa5f2018-01-29 19:24:42454 }
455
456 executable(_exec_target) {
Andrew Grieve1b290e4a22020-11-24 20:07:01457 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
Kevin Marshallf35fa5f2018-01-29 19:24:42458 output_name = _exec_target
Scott Graham4c4cdc52017-05-29 20:45:03459 }
dpranke2a294622015-08-07 05:23:01460 } else if (is_ios) {
Dirk Pranke79d065d2020-08-29 03:28:30461 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
Mirko Bonadei50e251d2020-09-14 18:05:46462 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
Dirk Pranke79d065d2020-08-29 03:28:30463
Rohit Raof9b096d2019-09-09 22:26:23464 declare_args() {
465 # Keep the unittest-as-xctest functionality defaulted to off until the
466 # bots are updated to handle it properly.
467 # TODO(crbug.com/1001667): Remove this arg once the iOS test runner
468 # supports running unittests with xctest.
469 enable_run_ios_unittests_with_xctest = false
470 }
471
sdefresne012857872016-03-16 10:55:37472 _test_target = target_name
Sylvain Defresne3f48aedc2021-10-07 10:17:27473 _output_name = target_name
474 if (defined(invoker.output_name)) {
475 _output_name = invoker.output_name
476 }
477
Jeff Yoonf7f4eb42020-03-06 18:55:36478 _wrapper_output_name = "run_${target_name}"
479 ios_test_runner_wrapper(_wrapper_output_name) {
480 forward_variables_from(invoker,
481 [
482 "data",
Jeff Yoonf7f4eb42020-03-06 18:55:36483 "deps",
484 "executable_args",
Sylvain Defresne3f48aedc2021-10-07 10:17:27485 "output_name",
Jeff Yoonf7f4eb42020-03-06 18:55:36486 "retries",
487 "shards",
488 ])
489
490 _root_build_dir = rebase_path("${root_build_dir}", root_build_dir)
491
492 if (!defined(executable_args)) {
493 executable_args = []
494 }
495 executable_args += [
496 "--app",
497 "@WrappedPath(${_root_build_dir}/${_test_target}.app)",
498 ]
499
500 wrapper_output_name = "${_wrapper_output_name}"
Dirk Pranke19a58732021-03-24 22:26:22501
502 if (!defined(data)) {
503 data = []
504 }
Jamie Madilldd60ee62021-04-13 19:25:52505 if (tests_have_location_tags) {
506 data += [ "//testing/location_tags.json" ]
507 }
Jeff Yoonf7f4eb42020-03-06 18:55:36508 }
509
sdefresne012857872016-03-16 10:55:37510 _resources_bundle_data = target_name + "_resources_bundle_data"
511
512 bundle_data(_resources_bundle_data) {
sdefresne047490e2016-07-22 08:49:34513 visibility = [ ":$_test_target" ]
Nico Weber852532f2020-01-28 18:17:22514 sources = [ "//testing/gtest_ios/Default.png" ]
515 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
dpranke2a294622015-08-07 05:23:01516 }
517
Mirko Bonadei15522bc2020-09-16 20:38:39518 force_xctest = enable_run_ios_unittests_with_xctest ||
519 (defined(invoker.is_xctest) && invoker.is_xctest)
520
521 if (force_xctest) {
Rohit Raof9b096d2019-09-09 22:26:23522 ios_test_target_type = "ios_xctest_test"
523 } else {
524 ios_test_target_type = "ios_app_bundle"
525 }
526
527 target(ios_test_target_type, _test_target) {
dpranke2a294622015-08-07 05:23:01528 testonly = true
sdefresnea828c282016-05-30 18:04:20529
Mirko Bonadei15522bc2020-09-16 20:38:39530 if (force_xctest && build_with_chromium) {
Rohit Raof9b096d2019-09-09 22:26:23531 xctest_module_target = "//base/test:google_test_runner"
532 }
533
Andrew Grieve1b290e4a22020-11-24 20:07:01534 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
sdefresne9e147e02016-06-07 00:10:13535
536 # Provide sensible defaults in case invoker did not define any of those
537 # required variables.
sdefresne05b97ca2016-06-08 07:19:46538 if (!defined(info_plist) && !defined(info_plist_target)) {
sdefresne9e147e02016-06-07 00:10:13539 info_plist = "//testing/gtest_ios/unittest-Info.plist"
540 }
sdefresne9e147e02016-06-07 00:10:13541
Sylvain Defresne3c5a1312021-09-23 17:08:09542 if (ios_use_shared_bundle_id_for_test_apps) {
Sylvain Defresne3f48aedc2021-10-07 10:17:27543 bundle_identifier = "$ios_app_bundle_id_prefix.gtest.unittests"
Ali Jumaff45dd82021-11-08 21:53:50544 not_needed([ "_output_name" ])
Sylvain Defresne3c5a1312021-09-23 17:08:09545 } else {
Sylvain Defresne3f48aedc2021-10-07 10:17:27546 bundle_identifier = "$ios_app_bundle_id_prefix.gtest." +
547 string_replace(_output_name, "_", "-")
Sylvain Defresne3c5a1312021-09-23 17:08:09548 }
dpranke2a294622015-08-07 05:23:01549
sdefresne047490e2016-07-22 08:49:34550 if (!defined(bundle_deps)) {
551 bundle_deps = []
552 }
553 bundle_deps += [ ":$_resources_bundle_data" ]
Jeff Yoonf7f4eb42020-03-06 18:55:36554
555 if (!defined(data_deps)) {
556 data_deps = []
557 }
558
559 # Include the generate_wrapper as part of data_deps
560 data_deps += [ ":${_wrapper_output_name}" ]
Mirko Bonadei50e251d2020-09-14 18:05:46561 write_runtime_deps = _runtime_deps_file
Greg Guterman6963dc02021-04-07 05:20:59562
563 if (use_rts) {
564 data_deps += [ ":${invoker.target_name}__rts_filters" ]
565 }
dpranke2a294622015-08-07 05:23:01566 }
Yuke Liao2a9b2f0e2021-04-16 00:40:11567 } else if ((is_chromeos_ash || (is_chromeos_lacros && is_chromeos_device)) &&
568 cros_board != "") {
Dirk Pranke79d065d2020-08-29 03:28:30569 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
570
Yuke Liao2a9b2f0e2021-04-16 00:40:11571 # Building for a cros board (ie: not linux-chromeos or linux-lacros).
Benjamin Pastene3bce864e2018-04-14 01:16:32572
Benjamin Pastene3bce864e2018-04-14 01:16:32573 _gen_runner_target = "${target_name}__runner"
574 _runtime_deps_file =
575 "$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") +
576 "/" + get_label_info(target_name, "name") + ".runtime_deps"
577
Xinan Lin6be01252021-06-25 23:07:36578 _generated_script = "$root_build_dir/bin/run_" + invoker.target_name
579 if (is_skylab) {
580 generate_skylab_runner_script(_gen_runner_target) {
581 generated_script = _generated_script
582 test_exe = invoker.target_name
Yuke Liaoacb74b12021-04-23 23:37:34583 }
Xinan Lin6be01252021-06-25 23:07:36584 } else {
585 generate_runner_script(_gen_runner_target) {
586 generated_script = _generated_script
587 test_exe = invoker.target_name
588 runtime_deps_file = _runtime_deps_file
Yuke Liaoacb74b12021-04-23 23:37:34589
Xinan Lin6be01252021-06-25 23:07:36590 if (is_chromeos_lacros) {
591 # At build time, Lacros tests don't know whether they'll run on VM or
592 # HW, and instead, these flags are specified at runtime when invoking
593 # the generated runner script.
594 skip_generating_board_args = true
595 }
Greg Guterman6963dc02021-04-07 05:20:59596
Xinan Lin6be01252021-06-25 23:07:36597 if (tests_have_location_tags) {
598 data = [ "//testing/location_tags.json" ]
599 }
600
601 if (use_rts) {
602 data_deps = [ ":${invoker.target_name}__rts_filters" ]
603 }
Greg Guterman6963dc02021-04-07 05:20:59604 }
Benjamin Pastene3bce864e2018-04-14 01:16:32605 }
606
607 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01608 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
609 forward_variables_from(invoker, [ "visibility" ])
Benjamin Pastene3bce864e2018-04-14 01:16:32610 if (!defined(deps)) {
611 deps = []
612 }
613 if (!defined(data)) {
614 data = []
615 }
616
Ben Pastene41041782019-02-16 04:21:58617 # We use a special trigger script for CrOS hardware tests.
618 data += [ "//testing/trigger_scripts/chromeos_device_trigger.py" ]
619
Benjamin Pastene3bce864e2018-04-14 01:16:32620 output_name = target_name
621 write_runtime_deps = _runtime_deps_file
622 data += [ _runtime_deps_file ]
Tom Andersonce772fa2018-05-30 22:20:37623 deps += [ ":$_gen_runner_target" ]
Greg Guterman6963dc02021-04-07 05:20:59624
625 if (use_rts) {
626 if (!defined(data_deps)) {
627 data_deps = []
628 }
629 data_deps += [ ":${invoker.target_name}__rts_filters" ]
630 }
Benjamin Pastene3bce864e2018-04-14 01:16:32631 }
Yuke Liao2a9b2f0e2021-04-16 00:40:11632 } else if (is_chromeos_lacros && !is_chromeos_device) {
Yuke Liaoe703384b2020-07-16 01:05:24633 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
634 _executable = target_name
635 _gen_runner_target = "${target_name}__runner"
636
Yuke Liao32af4242020-07-16 21:48:02637 if (defined(invoker.use_xvfb)) {
638 _use_xvfb = invoker.use_xvfb
639 } else {
640 _use_xvfb = false
641 }
642
Yuke Liaod037abc2020-10-06 22:48:22643 # When use_xvfb is set by the invoker, it indicates that running this test
644 # target requires a window, and in lacros build, ash-chrome serves as the
645 # display server. Note that even though the tests themselves do not require
646 # xvfb anymore, xvfb.py is still needed to invoke the lacros test runner
647 # because ash-chrome is based on x11.
648 _use_ash_chrome = _use_xvfb
649
Yuke Liaoe703384b2020-07-16 01:05:24650 generate_wrapper(_gen_runner_target) {
Yuke Liaoe703384b2020-07-16 01:05:24651 wrapper_script = "$root_build_dir/bin/run_" + _executable
Yuke Liao32af4242020-07-16 21:48:02652
Yuke Liao2e4953cf2020-07-26 19:20:19653 data = []
Will Harrisd35e2c92021-04-07 01:42:02654 data_deps = [ "//testing:test_scripts_shared" ]
655
Yuke Liao32af4242020-07-16 21:48:02656 if (_use_xvfb) {
657 executable = "//testing/xvfb.py"
658 } else {
659 executable = "//testing/test_env.py"
660 }
Jamie Madilldd60ee62021-04-13 19:25:52661 if (tests_have_location_tags) {
662 data += [ "//testing/location_tags.json" ]
663 }
Yuke Liao32af4242020-07-16 21:48:02664
Yuke Liaoe703384b2020-07-16 01:05:24665 executable_args = [
Yuke Liao32af4242020-07-16 21:48:02666 "@WrappedPath(../../build/lacros/test_runner.py)",
Yuke Liao240816d2020-07-22 00:10:39667 "test",
Yuke Liaoe703384b2020-07-16 01:05:24668 "@WrappedPath(./${_executable})",
669 "--test-launcher-bot-mode",
670 ]
Yuke Liao32af4242020-07-16 21:48:02671
Yuke Liaof540c742020-07-29 16:28:34672 if (_use_ash_chrome) {
Sven Zheng6d089f02021-09-13 17:59:37673 executable_args += [ "--ash-chrome-path" ]
674
675 # Can't use --ash-chrome-path=path because WrappedPath
676 # won't be expanded for that usage.
677 executable_args += [ "@WrappedPath(./ash_clang_x64/test_ash_chrome)" ]
Yuke Liao240816d2020-07-22 00:10:39678 }
679
Yuke Liaoe703384b2020-07-16 01:05:24680 if (is_asan) {
681 executable_args += [ "--asan=true" ]
682 }
683 if (is_msan) {
684 executable_args += [ "--msan=true" ]
685 }
686 if (is_tsan) {
687 executable_args += [ "--tsan=true" ]
688 }
689 if (use_cfi_diag) {
690 executable_args += [ "--cfi-diag=true" ]
691 }
692
Yuke Liao2e4953cf2020-07-26 19:20:19693 data += [
Yuke Liao240816d2020-07-22 00:10:39694 "//build/lacros/test_runner.py",
Yuke Liaoe703384b2020-07-16 01:05:24695 "//.vpython",
696 ]
Greg Guterman6963dc02021-04-07 05:20:59697
698 if (use_rts) {
699 data_deps += [ ":${invoker.target_name}__rts_filters" ]
700 }
Yuke Liaoe703384b2020-07-16 01:05:24701 }
702
703 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01704 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
705 forward_variables_from(invoker, [ "visibility" ])
Yuke Liaoe703384b2020-07-16 01:05:24706 if (!defined(deps)) {
707 deps = []
708 }
709
Yuke Liaod037abc2020-10-06 22:48:22710 if (!defined(data_deps)) {
711 data_deps = []
712 }
713
Yuke Liaoe703384b2020-07-16 01:05:24714 write_runtime_deps = _runtime_deps_file
715 deps += [ ":$_gen_runner_target" ]
Yuke Liaod037abc2020-10-06 22:48:22716 if (_use_ash_chrome && also_build_ash_chrome) {
Sven Zheng74d4bd42021-06-02 02:48:56717 data_deps += [ "//chrome/test:test_ash_chrome(//build/toolchain/linux:ash_clang_x64)" ]
Yuke Liaod037abc2020-10-06 22:48:22718 }
Greg Guterman6963dc02021-04-07 05:20:59719
720 if (use_rts) {
721 data_deps += [ ":${invoker.target_name}__rts_filters" ]
722 }
Yuke Liaoe703384b2020-07-16 01:05:24723 }
Dirk Prankedd4ff742020-11-18 19:57:32724 } else if (!is_nacl) {
Dirk Pranke79d065d2020-08-29 03:28:30725 if (is_mac || is_win) {
726 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
727 }
728
Dirk Prankedd4ff742020-11-18 19:57:32729 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
730 _executable = target_name
731 _gen_runner_target = "${target_name}__runner"
Dirk Pranke31e346e2020-07-15 00:54:06732
Dirk Prankedd4ff742020-11-18 19:57:32733 if ((is_linux || is_chromeos) && defined(invoker.use_xvfb)) {
734 _use_xvfb = invoker.use_xvfb
735 } else {
736 _use_xvfb = false
737 }
738
739 generate_wrapper(_gen_runner_target) {
Dirk Prankedd4ff742020-11-18 19:57:32740 wrapper_script = "$root_build_dir/bin/run_" + _executable
741
742 data = []
Will Harrisd35e2c92021-04-07 01:42:02743 data_deps = [ "//testing:test_scripts_shared" ]
744
Dirk Prankedd4ff742020-11-18 19:57:32745 if (_use_xvfb) {
746 executable = "//testing/xvfb.py"
Dirk Pranke31e346e2020-07-15 00:54:06747 } else {
Dirk Prankedd4ff742020-11-18 19:57:32748 executable = "//testing/test_env.py"
Dirk Pranke31e346e2020-07-15 00:54:06749 }
Jamie Madilldd60ee62021-04-13 19:25:52750 if (tests_have_location_tags) {
751 data += [ "//testing/location_tags.json" ]
752 }
Dirk Pranke31e346e2020-07-15 00:54:06753
Dirk Prankedd4ff742020-11-18 19:57:32754 executable_args = [
755 "@WrappedPath(./${_executable})",
756 "--test-launcher-bot-mode",
757 ]
758 if (is_asan) {
759 executable_args += [ "--asan=true" ]
Dirk Pranke31e346e2020-07-15 00:54:06760 }
Dirk Prankedd4ff742020-11-18 19:57:32761 if (is_msan) {
762 executable_args += [ "--msan=true" ]
763 }
764 if (is_tsan) {
765 executable_args += [ "--tsan=true" ]
766 }
767 if (use_cfi_diag) {
768 executable_args += [ "--cfi-diag=true" ]
769 }
770
771 data += [ "//.vpython" ]
Greg Guterman6963dc02021-04-07 05:20:59772
773 if (use_rts) {
774 data_deps += [ ":${invoker.target_name}__rts_filters" ]
775 }
Dirk Pranke31e346e2020-07-15 00:54:06776 }
777
778 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01779 forward_variables_from(invoker,
780 "*",
781 TESTONLY_AND_VISIBILITY + [ "use_xvfb" ])
782 forward_variables_from(invoker, [ "visibility" ])
Dirk Pranke31e346e2020-07-15 00:54:06783 if (!defined(deps)) {
784 deps = []
785 }
786
Dirk Pranke31e346e2020-07-15 00:54:06787 deps += [
788 # Give tests the default manifest on Windows (a no-op elsewhere).
789 "//build/win:default_exe_manifest",
790 ]
791
Dirk Prankedd4ff742020-11-18 19:57:32792 write_runtime_deps = _runtime_deps_file
793 deps += [ ":$_gen_runner_target" ]
Greg Guterman50ed4b42021-04-08 01:15:11794
795 if (use_rts) {
796 if (!defined(data_deps)) {
797 data_deps = []
798 }
799 data_deps += [ ":${invoker.target_name}__rts_filters" ]
800 }
Dirk Prankedd4ff742020-11-18 19:57:32801 }
802 } else {
803 # This is a catch-all clause for NaCl toolchains and other random
804 # configurations that might define tests; test() in these configs
805 # will just define the underlying executables.
806 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb,
807 "use_xvfb should not be defined for a non-linux configuration")
808 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01809 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
810 forward_variables_from(invoker, [ "visibility" ])
Dirk Prankedd4ff742020-11-18 19:57:32811 if (!defined(deps)) {
812 deps = []
Dirk Pranke31e346e2020-07-15 00:54:06813 }
Greg Guterman6963dc02021-04-07 05:20:59814
815 if (use_rts) {
816 if (!defined(data_deps)) {
817 data_deps = []
818 }
819 data_deps += [ ":${invoker.target_name}__rts_filters" ]
820 }
Dirk Pranke31e346e2020-07-15 00:54:06821 }
qsrfb5251d12015-01-21 15:57:22822 }
823}
brettwedb6ecc2016-07-14 23:37:03824
Dirk Pranke6188075b2020-10-01 19:31:28825# Defines a type of test that invokes a script to run, rather than
826# invoking an executable.
827#
828# The script must implement the
829# [test executable API](//docs/testing/test_executable_api.md).
830#
831# The template must be passed the `script` parameter, which specifies
832# the path to the script to run. It may optionally be passed a
833# `script_args` parameter, which can be used to include a list of
834# args to be specified by default. The template will produce
835# a `$root_build_dir/run_$target_name` wrapper and write the runtime_deps
836# for the target to $root_build_dir/${target_name}.runtime_deps, as per
837# the conventions listed in the
838# [test wrapper API](//docs/testing/test_wrapper_api.md).
839template("script_test") {
Greg Guterman6963dc02021-04-07 05:20:59840 if (use_rts) {
841 action("${target_name}__rts_filters") {
842 script = "//build/add_rts_filters.py"
Greg Guterman49a42172021-04-08 22:04:53843 rts_file = "${root_build_dir}/gen/rts/${invoker.target_name}.filter"
Greg Guterman6963dc02021-04-07 05:20:59844 args = [ rebase_path(rts_file, root_build_dir) ]
845 outputs = [ rts_file ]
846 }
847 }
848
Dirk Pranke6188075b2020-10-01 19:31:28849 generate_wrapper(target_name) {
850 testonly = true
851 wrapper_script = "${root_build_dir}/bin/run_${target_name}"
852
853 executable = "//testing/test_env.py"
854
855 executable_args =
856 [ "@WrappedPath(" + rebase_path(invoker.script, root_build_dir) + ")" ]
857 if (defined(invoker.args)) {
858 executable_args += invoker.args
859 }
860
Will Harrisd35e2c92021-04-07 01:42:02861 data = [ invoker.script ]
Dirk Pranke2dd666cd2021-03-03 16:57:47862
863 if (defined(invoker.run_under_python2) && invoker.run_under_python2) {
864 use_vpython3 = false
865 data += [ "//.vpython" ]
Dirk Pranke2dd666cd2021-03-03 16:57:47866 }
867
Dirk Pranke6188075b2020-10-01 19:31:28868 if (defined(invoker.data)) {
869 data += invoker.data
870 }
Jamie Madilldd60ee62021-04-13 19:25:52871 if (tests_have_location_tags) {
872 data += [ "//testing/location_tags.json" ]
873 }
Dirk Pranke19a58732021-03-24 22:26:22874
Will Harrisd35e2c92021-04-07 01:42:02875 data_deps = [ "//testing:test_scripts_shared" ]
Dirk Pranke6188075b2020-10-01 19:31:28876 if (defined(invoker.data_deps)) {
877 data_deps += invoker.data_deps
878 }
879
880 forward_variables_from(invoker,
881 [ "*" ],
Andrew Grieve1b290e4a22020-11-24 20:07:01882 TESTONLY_AND_VISIBILITY + [
883 "data",
884 "data_deps",
885 "script",
886 "script_args",
887 ])
888 forward_variables_from(invoker, [ "visibility" ])
Dirk Pranke6188075b2020-10-01 19:31:28889
890 write_runtime_deps = "${root_build_dir}/${target_name}.runtime_deps"
Greg Guterman6963dc02021-04-07 05:20:59891
892 if (use_rts) {
893 data_deps += [ ":${invoker.target_name}__rts_filters" ]
894 }
Dirk Pranke6188075b2020-10-01 19:31:28895 }
896}
897
brettwedb6ecc2016-07-14 23:37:03898# Test defaults.
899set_defaults("test") {
900 if (is_android) {
901 configs = default_shared_library_configs
Yipeng Wang158dbc5c2017-06-30 18:16:41902 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Thomas Anderson11c1d9822019-01-15 06:32:59903 configs += [ "//build/config/android:hide_all_but_jni" ]
brettwedb6ecc2016-07-14 23:37:03904 } else {
905 configs = default_executable_configs
906 }
907}