[go: nahoru, domu]

blob: aceed03d15d72d1a4020d018622506d752bfa41f [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")
James Cook209256f2018-12-07 18:40:5026 import("//build/config/android/extract_unwind_tables.gni")
jcivellif4462a352017-01-10 04:45:5927 import("//build/config/android/rules.gni")
Abhishek Arya2f5f7342018-06-13 16:59:4428 import("//build/config/sanitizers/sanitizers.gni")
Dirk Prankedd4ff742020-11-18 19:57:3229} else if (is_fuchsia) {
Kevin Marshall184e9092018-02-07 21:09:0630 import("//build/config/chromecast_build.gni")
Kevin Marshall55fd8522019-10-04 22:47:0131 import("//build/config/fuchsia/generate_runner_scripts.gni")
Kevin Marshallf35fa5f2018-01-29 19:24:4232 import("//build/config/fuchsia/package.gni")
Chong Gu26908f42021-01-29 03:13:0733 import("//third_party/fuchsia-sdk/sdk/build/cmc.gni")
Yuke Liaoe502a742021-04-19 23:15:0234} else if ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device) {
Ben Pastene4c35c572018-04-30 23:21:4835 import("//build/config/chromeos/rules.gni")
Dirk Prankedd4ff742020-11-18 19:57:3236 import("//build/config/sanitizers/sanitizers.gni")
Dirk Pranke6188075b2020-10-01 19:31:2837 import("//build/util/generate_wrapper.gni")
Dirk Prankedd4ff742020-11-18 19:57:3238} else if (is_ios) {
Jeff Yoonf7f4eb42020-03-06 18:55:3639 import("//build/config/ios/ios_sdk.gni")
40 import("//build/config/ios/ios_test_runner_wrapper.gni")
41 import("//build/config/ios/rules.gni")
Dirk Prankedd4ff742020-11-18 19:57:3242} else {
Dirk Pranke31e346e2020-07-15 00:54:0643 import("//build/config/sanitizers/sanitizers.gni")
44 import("//build/util/generate_wrapper.gni")
45}
46
qsrfb5251d12015-01-21 15:57:2247# Define a test as an executable (or apk on Android) with the "testonly" flag
48# set.
agrieve62ab00282016-04-05 02:03:4549# Variable:
Dirk Pranke79d065d2020-08-29 03:28:3050# use_xvfb: (optional) whether to run the executable under Xvfb.
agrieve62ab00282016-04-05 02:03:4551# use_raw_android_executable: Use executable() rather than android_apk().
ynovikov389d9e442016-05-27 02:34:5652# use_native_activity: Test implements ANativeActivity_onCreate().
Mirko Bonadei15522bc2020-09-16 20:38:3953# is_xctest: (iOS, optional) whether to build the executable as XCTest.
54# Similar to the GN arg 'enable_run_ios_unittests_with_xctest' but
55# for build targets.
Stefano Duo4128b6b2021-08-02 21:24:4356# allow_cleartext_traffic: (Android, optional) whether to allow cleartext
57# network requests during the test.
qsrfb5251d12015-01-21 15:57:2258template("test") {
Greg Guterman6963dc02021-04-07 05:20:5959 # Ensures the rts file exists and if not, creates a dummy file
60 if (use_rts) {
61 action("${target_name}__rts_filters") {
62 script = "//build/add_rts_filters.py"
Greg Guterman49a42172021-04-08 22:04:5363 rts_file = "${root_build_dir}/gen/rts/${invoker.target_name}.filter"
Greg Guterman6963dc02021-04-07 05:20:5964 args = [ rebase_path(rts_file, root_build_dir) ]
65 outputs = [ rts_file ]
66 }
67 }
68
Andrew Grieve1b290e4a22020-11-24 20:07:0169 testonly = true
Mirko Bonadei15522bc2020-09-16 20:38:3970 if (!is_ios) {
71 assert(!defined(invoker.is_xctest) || !invoker.is_xctest,
72 "is_xctest can be set only for iOS builds")
73 }
Stefano Duo4128b6b2021-08-02 21:24:4374 if (!is_android) {
75 assert(!defined(invoker.allow_cleartext_traffic),
76 "allow_cleartext_traffic can be set only for Android tests")
77 }
78
qsrfb5251d12015-01-21 15:57:2279 if (is_android) {
Dirk Pranke79d065d2020-08-29 03:28:3080 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
81
Peter Kotwicz10742f82021-04-15 22:32:5082 _use_default_launcher =
83 !defined(invoker.use_default_launcher) || invoker.use_default_launcher
84 if (!defined(invoker.use_raw_android_executable)) {
85 # Checkouts where build_with_chromium == false often have a custom GN
86 # template wrapper around test() which sets use_default_launcher == false.
87 # Set the _use_raw_android_executable default so that test() targets which
88 # do not use the custom wrapper
89 # (1) Do not cause "gn gen" to fail
90 # (2) Do not need to be moved into if(build_with_chromium) block.
91 _use_raw_android_executable =
92 !build_with_chromium && _use_default_launcher
93 } else {
94 not_needed([ "_use_default_launcher" ])
95 _use_raw_android_executable = invoker.use_raw_android_executable
96 }
qsrfb5251d12015-01-21 15:57:2297
agrieve67855de2016-03-30 14:46:0198 # output_name is used to allow targets with the same name but in different
99 # packages to still produce unique runner scripts.
100 _output_name = invoker.target_name
mikecase56d80d72015-06-03 00:57:26101 if (defined(invoker.output_name)) {
agrieve67855de2016-03-30 14:46:01102 _output_name = invoker.output_name
mikecase56d80d72015-06-03 00:57:26103 }
agrieve62ab00282016-04-05 02:03:45104
agrieveb355ad152016-04-19 03:45:23105 _test_runner_target = "${_output_name}__test_runner_script"
jbudorickd29ecfa72016-11-18 22:45:42106 _wrapper_script_vars = [
agrievee41ae1902016-04-25 14:12:51107 "ignore_all_data_deps",
jbudorickd29ecfa72016-11-18 22:45:42108 "shard_timeout",
agrievee41ae1902016-04-25 14:12:51109 ]
agrieve3ac557f02016-04-12 15:52:00110
jbudorickced2a252016-06-09 16:38:54111 assert(_use_raw_android_executable || enable_java_templates)
112
agrieve62ab00282016-04-05 02:03:45113 if (_use_raw_android_executable) {
Peter Kotwicz13a827a62021-04-22 22:34:49114 not_needed(invoker, [ "add_unwind_tables_in_apk" ])
115
agrieve62ab00282016-04-05 02:03:45116 _exec_target = "${target_name}__exec"
117 _dist_target = "${target_name}__dist"
118 _exec_output =
119 "$target_out_dir/${invoker.target_name}/${invoker.target_name}"
120
121 executable(_exec_target) {
122 # Configs will always be defined since we set_defaults in BUILDCONFIG.gn.
123 configs = []
Dirk Pranke19a58732021-03-24 22:26:22124 forward_variables_from(
125 invoker,
126 "*",
127 TESTONLY_AND_VISIBILITY + _wrapper_script_vars + [
128 "data_deps",
129 "extra_dist_files",
130 ])
agrieve62ab00282016-04-05 02:03:45131
132 # Thanks to the set_defaults() for test(), configs are initialized with
133 # the default shared_library configs rather than executable configs.
Thomas Anderson11c1d9822019-01-15 06:32:59134 configs -= [
135 "//build/config:shared_library_config",
136 "//build/config/android:hide_all_but_jni",
137 ]
agrieve62ab00282016-04-05 02:03:45138 configs += [ "//build/config:executable_config" ]
139
Dirk Pranke19a58732021-03-24 22:26:22140 if (defined(invoker.data_deps)) {
141 data_deps = invoker.data_deps
142 } else {
143 data_deps = []
144 }
145 if (!defined(data)) {
146 data = []
147 }
Jamie Madilldd60ee62021-04-13 19:25:52148 if (tests_have_location_tags) {
149 data += [ "//testing/location_tags.json" ]
150 }
Dirk Pranke19a58732021-03-24 22:26:22151
agrieve62ab00282016-04-05 02:03:45152 # Don't output to the root or else conflict with the group() below.
153 output_name = rebase_path(_exec_output, root_out_dir)
Greg Guterman50ed4b42021-04-08 01:15:11154
155 if (use_rts) {
156 data_deps += [ ":${invoker.target_name}__rts_filters" ]
157 }
agrieve62ab00282016-04-05 02:03:45158 }
159
160 create_native_executable_dist(_dist_target) {
agrieve62ab00282016-04-05 02:03:45161 dist_dir = "$root_out_dir/$target_name"
162 binary = _exec_output
Nico Weber852532f2020-01-28 18:17:22163 deps = [ ":$_exec_target" ]
agrieve62ab00282016-04-05 02:03:45164 if (defined(invoker.extra_dist_files)) {
165 extra_files = invoker.extra_dist_files
166 }
Greg Guterman50ed4b42021-04-08 01:15:11167
168 if (use_rts) {
169 if (!defined(data_deps)) {
170 data_deps = []
171 }
172 data_deps += [ ":${invoker.target_name}__rts_filters" ]
173 }
agrieve62ab00282016-04-05 02:03:45174 }
175 } else {
Andrew Grievec61b8dff2019-10-21 16:32:02176 _library_target = "${target_name}__library"
177 _apk_target = "${target_name}__apk"
agrieve62ab00282016-04-05 02:03:45178 _apk_specific_vars = [
Stefano Duo4128b6b2021-08-02 21:24:43179 "allow_cleartext_traffic",
agrieve62ab00282016-04-05 02:03:45180 "android_manifest",
agrievec6811b422016-06-23 02:25:09181 "android_manifest_dep",
Peter Kotwiczab1b5422021-03-30 22:58:27182 "android_manifest_template",
Clark DuVall1bee5322020-06-10 05:51:55183 "app_as_shared_lib",
agrieve62ab00282016-04-05 02:03:45184 "enable_multidex",
Peter Kotwicz10742f82021-04-15 22:32:50185 "generate_final_jni",
Benoît Lizéd8b8f742019-11-07 12:50:07186 "product_config_java_packages",
Tibor Goldschwendt95db95d2019-06-17 20:32:02187 "min_sdk_version",
huapenglc35ba6e2016-05-25 23:08:07188 "proguard_configs",
189 "proguard_enabled",
Fred Mello0cc91c62019-08-24 01:53:45190 "srcjar_deps",
Tibor Goldschwendt95db95d2019-06-17 20:32:02191 "target_sdk_version",
agrieve62ab00282016-04-05 02:03:45192 "use_default_launcher",
ynovikov389d9e442016-05-27 02:34:56193 "use_native_activity",
agrieve62ab00282016-04-05 02:03:45194 ]
Siddhartha764226b2018-03-13 02:32:55195
196 # Adds the unwind tables from unstripped binary as an asset file in the
197 # apk, if |add_unwind_tables_in_apk| is specified by the test.
198 if (defined(invoker.add_unwind_tables_in_apk) &&
199 invoker.add_unwind_tables_in_apk) {
200 _unwind_table_asset_name = "${target_name}_unwind_assets"
201 unwind_table_asset(_unwind_table_asset_name) {
Siddhartha764226b2018-03-13 02:32:55202 library_target = _library_target
Nico Weber852532f2020-01-28 18:17:22203 deps = [ ":$_library_target" ]
Siddhartha764226b2018-03-13 02:32:55204 }
205 }
206
agrieve62ab00282016-04-05 02:03:45207 shared_library(_library_target) {
208 # Configs will always be defined since we set_defaults in BUILDCONFIG.gn.
209 configs = [] # Prevent list overwriting warning.
210 configs = invoker.configs
agrieve62ab00282016-04-05 02:03:45211
jbudorickd29ecfa72016-11-18 22:45:42212 forward_variables_from(
213 invoker,
214 "*",
Peter Wen2052bd12020-12-03 20:15:07215 [ "deps" ] + _apk_specific_vars + _wrapper_script_vars +
216 TESTONLY_AND_VISIBILITY)
217
218 # Native targets do not need to depend on java targets. Filter them out
219 # so that the shared library can be built without needing to wait for
220 # dependent java targets.
221 deps = []
222 if (defined(invoker.deps)) {
223 foreach(_dep, invoker.deps) {
224 _target_label = get_label_info(_dep, "label_no_toolchain")
225 if (filter_exclude([ _target_label ], java_target_patterns) != []) {
226 deps += [ _dep ]
227 }
228 }
229 }
agrieve62ab00282016-04-05 02:03:45230
Peter Kotwiczb9957d62021-04-12 21:09:43231 if (_use_default_launcher) {
Tom Andersonce772fa2018-05-30 22:20:37232 deps += [ "//testing/android/native_test:native_test_native_code" ]
agrieve62ab00282016-04-05 02:03:45233 }
234 }
235 unittest_apk(_apk_target) {
Daniel Bratellfdda4652019-01-31 15:45:54236 forward_variables_from(invoker, _apk_specific_vars)
agrieve48bd27e2016-06-22 21:04:07237 shared_library = ":$_library_target"
agrieve62ab00282016-04-05 02:03:45238 apk_name = invoker.target_name
239 if (defined(invoker.output_name)) {
240 apk_name = invoker.output_name
agrieve62ab00282016-04-05 02:03:45241 install_script_name = "install_${invoker.output_name}"
242 }
agrieveb355ad152016-04-19 03:45:23243
Daniel Bratellfdda4652019-01-31 15:45:54244 if (defined(invoker.deps)) {
245 deps = invoker.deps
246 } else {
247 deps = []
248 }
249
jcivellif4462a352017-01-10 04:45:59250 # Add the Java classes so that each target does not have to do it.
Peter Kotwiczb9957d62021-04-12 21:09:43251 if (_use_default_launcher) {
252 deps += [ "//base/test:test_support_java" ]
253 }
jcivellif4462a352017-01-10 04:45:59254
Siddhartha764226b2018-03-13 02:32:55255 if (defined(_unwind_table_asset_name)) {
256 deps += [ ":${_unwind_table_asset_name}" ]
257 }
Greg Guterman50ed4b42021-04-08 01:15:11258
259 if (use_rts) {
260 data_deps = [ ":${invoker.target_name}__rts_filters" ]
261 }
agrieve62ab00282016-04-05 02:03:45262 }
Andrew Grievee1dc23f2019-10-22 16:26:36263 }
agrieve62ab00282016-04-05 02:03:45264
Andrew Grievee1dc23f2019-10-22 16:26:36265 test_runner_script(_test_runner_target) {
266 forward_variables_from(invoker, _wrapper_script_vars)
estevensonce844392016-12-15 19:57:57267
Andrew Grievee1dc23f2019-10-22 16:26:36268 if (_use_raw_android_executable) {
269 executable_dist_dir = "$root_out_dir/$_dist_target"
John Budorickd5dccb22020-02-01 02:16:34270 data_deps = [ ":$_exec_target" ]
Andrew Grievee1dc23f2019-10-22 16:26:36271 } else {
272 apk_target = ":$_apk_target"
273 incremental_apk = incremental_install
Andrew Grieve7ca6de32019-10-18 03:57:47274
275 # Dep needed for the test runner .runtime_deps file to pick up data
276 # deps from the forward_variables_from(invoker, "*") on the library.
Nico Weber852532f2020-01-28 18:17:22277 data_deps = [ ":$_library_target" ]
agrieve62ab00282016-04-05 02:03:45278 }
Andrew Grievee1dc23f2019-10-22 16:26:36279 test_name = _output_name
280 test_suite = _output_name
281 test_type = "gtest"
Greg Guterman6963dc02021-04-07 05:20:59282
283 if (use_rts) {
284 data_deps += [ ":${invoker.target_name}__rts_filters" ]
285 }
mikecase56d80d72015-06-03 00:57:26286 }
287
Andrew Grieve7ca6de32019-10-18 03:57:47288 # Create a wrapper script rather than using a group() in order to ensure
289 # "ninja $target_name" always works. If this was a group(), then GN would
290 # not create a top-level alias for it if a target exists in another
291 # directory with the same $target_name.
292 # Also - bots run this script directly for "components_perftests".
293 generate_wrapper(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01294 forward_variables_from(invoker, [ "visibility" ])
Andrew Grieve7ca6de32019-10-18 03:57:47295 executable = "$root_build_dir/bin/run_$_output_name"
296 wrapper_script = "$root_build_dir/$_output_name"
Nico Weber852532f2020-01-28 18:17:22297 deps = [ ":$_test_runner_target" ]
jbudorick686094f62017-05-04 21:52:40298 if (_use_raw_android_executable) {
Andrew Grieve7ca6de32019-10-18 03:57:47299 deps += [ ":$_dist_target" ]
jbudorick686094f62017-05-04 21:52:40300 } else {
Andrew Grieve7ca6de32019-10-18 03:57:47301 # Dep needed for the swarming .isolate file to pick up data
302 # deps from the forward_variables_from(invoker, "*") on the library.
303 deps += [
304 ":$_apk_target",
305 ":$_library_target",
306 ]
agrieve62ab00282016-04-05 02:03:45307 }
Dirk Pranke19a58732021-03-24 22:26:22308
309 if (defined(invoker.data_deps)) {
310 data_deps = invoker.data_deps
311 } else {
312 data_deps = []
313 }
Jamie Madilldd60ee62021-04-13 19:25:52314 if (tests_have_location_tags) {
315 data = [ "//testing/location_tags.json" ]
316 }
Greg Guterman6963dc02021-04-07 05:20:59317
318 if (use_rts) {
319 data_deps += [ ":${invoker.target_name}__rts_filters" ]
320 }
agrieve1a02e582015-10-15 21:35:39321 }
Scott Graham4c4cdc52017-05-29 20:45:03322 } else if (is_fuchsia) {
Dirk Pranke79d065d2020-08-29 03:28:30323 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
324
Scott Graham4c4cdc52017-05-29 20:45:03325 _output_name = invoker.target_name
Kevin Marshallf35fa5f2018-01-29 19:24:42326 _pkg_target = "${_output_name}_pkg"
Kevin Marshallf35fa5f2018-01-29 19:24:42327 _exec_target = "${_output_name}__exec"
Scott Graham4c4cdc52017-05-29 20:45:03328
Chong Gu17922692021-12-07 19:03:50329 # Generate a CMX fragment that provides the program name.
330 _test_program_fragment_target = "${target_name}_program-fragment"
331 _test_program_fragment = "${target_out_dir}/${target_name}_program.test-cmx"
332 _program_name = get_label_info(":${_exec_target}", "name")
333 generated_file(_test_program_fragment_target) {
334 contents = "{ \"program\": { \"binary\": \"${_program_name}\"}}"
335 outputs = [ _test_program_fragment ]
Wez6879f8a2021-09-07 20:27:02336 }
Chong Gu26908f42021-01-29 03:13:07337
Chong Gu17922692021-12-07 19:03:50338 # Collate the complete set of elements to include in the test component's
339 # manifest.
340 _manifest_fragments = [
341 "//build/config/fuchsia/test/minimum_capabilities.test-cmx",
342 _test_program_fragment,
343 ]
Chong Gu91a1fea2021-03-30 17:24:31344 if (defined(invoker.additional_manifest_fragments)) {
Wez6879f8a2021-09-07 20:27:02345 _manifest_fragments += invoker.additional_manifest_fragments
Chong Guacf19a32021-03-10 01:07:41346 }
Chong Gu28bf7e72021-05-26 01:36:19347
Wez6879f8a2021-09-07 20:27:02348 # Generate the test component manifest from the specified elements.
349 _test_component_manifest_target = "${target_name}_component-manifest"
Chong Gu17922692021-12-07 19:03:50350 _test_component_manifest = "${target_out_dir}/${target_name}.cmx"
Wez6879f8a2021-09-07 20:27:02351 cmc_merge(_test_component_manifest_target) {
352 sources = _manifest_fragments
Chong Gu17922692021-12-07 19:03:50353 output_name = "${_output_name}.cmx"
Wez6879f8a2021-09-07 20:27:02354 deps = [ ":${_test_program_fragment_target}" ]
Chong Gu7ad57c22021-03-11 00:24:38355 }
Chong Gu26908f42021-01-29 03:13:07356
Wez6879f8a2021-09-07 20:27:02357 # Define the test component, dependent on the generated manifest, and the
358 # test executable target.
359 _test_component_target = "${target_name}_component"
360 fuchsia_component(_test_component_target) {
361 deps = [ ":$_test_component_manifest_target" ]
362 data_deps = [ ":$_exec_target" ]
363 manifest = _test_component_manifest
364 visibility = [ ":*" ]
365 }
366
367 # Define components for each entry in |additional_manifests|, if any. Since
368 # manifests may themselves depend-on the outputs of |deps|, these components
369 # must each individually depend on |invoker.deps|.
370 _test_component_targets = [ ":${_test_component_target}" ]
371 if (defined(invoker.additional_manifests)) {
372 foreach(filename, invoker.additional_manifests) {
373 _additional_component_target =
374 target_name + "_" + get_path_info(filename, "name")
375 _test_component_targets += [ ":${_additional_component_target}" ]
376 fuchsia_component(_additional_component_target) {
377 forward_variables_from(invoker, [ "testonly" ])
378 data_deps = [ ":$_exec_target" ]
379 visibility = [ ":*" ]
380 manifest = filename
381
382 # Depend on |invoker.deps|, in case it includes a dependency that
383 # creates this additional component's manifest.
384 if (defined(invoker.deps)) {
385 deps = invoker.deps
386 }
387 }
388 }
389 }
390
391 # Define the package target that will bundle the test and additional
392 # components and their data.
393 fuchsia_package(_pkg_target) {
Kevin Marshall36c602c2021-11-04 16:16:21394 forward_variables_from(invoker,
395 [
396 "excluded_files",
397 "excluded_dirs",
398 ])
Wez6879f8a2021-09-07 20:27:02399 package_name = _output_name
400 deps = _test_component_targets
Kevin Marshall36c602c2021-11-04 16:16:21401
402 if (!defined(excluded_dirs)) {
403 excluded_dirs = []
404 }
405 excluded_dirs += [ devtools_root_location ]
Wez6879f8a2021-09-07 20:27:02406 }
407
408 # |target_name| refers to the package-runner rule, so that building
409 # "base_unittests" will build not only the executable, component, and
410 # package, but also the script required to run them.
Kevin Marshall5fadadd2021-10-16 00:08:25411 fuchsia_test_runner(target_name) {
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53412 forward_variables_from(invoker,
413 [
Kevin Marshall5fadadd2021-10-16 00:08:25414 "data",
415 "data_deps",
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53416 "package_deps",
Kevin Marshall5fadadd2021-10-16 00:08:25417 "use_test_server",
Fabrice de Gans-Riberi041a6522018-12-11 00:20:53418 ])
Kevin Marshall5fadadd2021-10-16 00:08:25419
Chong Guc6bfdf62021-10-20 23:37:00420 is_test_exe = true
Kevin Marshall39b4aa82018-06-23 00:12:15421 package = ":$_pkg_target"
Kevin Marshall5fadadd2021-10-16 00:08:25422 package_name = _output_name
Dimitri Glazkovc95e6dd2018-08-24 23:39:42423
Kevin Marshall5fadadd2021-10-16 00:08:25424 if (!defined(deps)) {
425 deps = []
Jamie Madilldd60ee62021-04-13 19:25:52426 }
Kevin Marshall5fadadd2021-10-16 00:08:25427 if (defined(invoker.deps)) {
428 deps += invoker.deps
429 }
Greg Guterman6963dc02021-04-07 05:20:59430
Kevin Marshall5fadadd2021-10-16 00:08:25431 if (!defined(data)) {
432 data = []
433 }
434 if (tests_have_location_tags) {
435 data += [ "//testing/location_tags.json" ]
436 }
437
438 if (!defined(data_deps)) {
439 data_deps = []
440 }
Chong Guc6bfdf62021-10-20 23:37:00441 data_deps += [ "//testing/buildbot/filters:fuchsia_filters" ]
Chong Gu258e22c2021-10-20 18:39:50442
Greg Guterman6963dc02021-04-07 05:20:59443 if (use_rts) {
Kevin Marshall5fadadd2021-10-16 00:08:25444 data_deps += [ ":${target_name}__rts_filters" ]
Greg Guterman6963dc02021-04-07 05:20:59445 }
Kevin Marshallf35fa5f2018-01-29 19:24:42446 }
447
448 executable(_exec_target) {
Andrew Grieve1b290e4a22020-11-24 20:07:01449 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
Kevin Marshallf35fa5f2018-01-29 19:24:42450 output_name = _exec_target
Scott Graham4c4cdc52017-05-29 20:45:03451 }
dpranke2a294622015-08-07 05:23:01452 } else if (is_ios) {
Dirk Pranke79d065d2020-08-29 03:28:30453 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
Mirko Bonadei50e251d2020-09-14 18:05:46454 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
Dirk Pranke79d065d2020-08-29 03:28:30455
Rohit Raof9b096d2019-09-09 22:26:23456 declare_args() {
457 # Keep the unittest-as-xctest functionality defaulted to off until the
458 # bots are updated to handle it properly.
459 # TODO(crbug.com/1001667): Remove this arg once the iOS test runner
460 # supports running unittests with xctest.
461 enable_run_ios_unittests_with_xctest = false
462 }
463
sdefresne012857872016-03-16 10:55:37464 _test_target = target_name
Sylvain Defresne3f48aedc2021-10-07 10:17:27465 _output_name = target_name
466 if (defined(invoker.output_name)) {
467 _output_name = invoker.output_name
468 }
469
Jeff Yoonf7f4eb42020-03-06 18:55:36470 _wrapper_output_name = "run_${target_name}"
471 ios_test_runner_wrapper(_wrapper_output_name) {
472 forward_variables_from(invoker,
473 [
474 "data",
Jeff Yoonf7f4eb42020-03-06 18:55:36475 "deps",
476 "executable_args",
Sylvain Defresne3f48aedc2021-10-07 10:17:27477 "output_name",
Jeff Yoonf7f4eb42020-03-06 18:55:36478 "retries",
479 "shards",
480 ])
481
482 _root_build_dir = rebase_path("${root_build_dir}", root_build_dir)
483
484 if (!defined(executable_args)) {
485 executable_args = []
486 }
487 executable_args += [
488 "--app",
489 "@WrappedPath(${_root_build_dir}/${_test_target}.app)",
490 ]
491
492 wrapper_output_name = "${_wrapper_output_name}"
Dirk Pranke19a58732021-03-24 22:26:22493
494 if (!defined(data)) {
495 data = []
496 }
Jamie Madilldd60ee62021-04-13 19:25:52497 if (tests_have_location_tags) {
498 data += [ "//testing/location_tags.json" ]
499 }
Jeff Yoonf7f4eb42020-03-06 18:55:36500 }
501
sdefresne012857872016-03-16 10:55:37502 _resources_bundle_data = target_name + "_resources_bundle_data"
503
504 bundle_data(_resources_bundle_data) {
sdefresne047490e2016-07-22 08:49:34505 visibility = [ ":$_test_target" ]
Nico Weber852532f2020-01-28 18:17:22506 sources = [ "//testing/gtest_ios/Default.png" ]
507 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
dpranke2a294622015-08-07 05:23:01508 }
509
Mirko Bonadei15522bc2020-09-16 20:38:39510 force_xctest = enable_run_ios_unittests_with_xctest ||
511 (defined(invoker.is_xctest) && invoker.is_xctest)
512
513 if (force_xctest) {
Rohit Raof9b096d2019-09-09 22:26:23514 ios_test_target_type = "ios_xctest_test"
515 } else {
516 ios_test_target_type = "ios_app_bundle"
517 }
518
519 target(ios_test_target_type, _test_target) {
dpranke2a294622015-08-07 05:23:01520 testonly = true
sdefresnea828c282016-05-30 18:04:20521
Mirko Bonadei15522bc2020-09-16 20:38:39522 if (force_xctest && build_with_chromium) {
Rohit Raof9b096d2019-09-09 22:26:23523 xctest_module_target = "//base/test:google_test_runner"
524 }
525
Andrew Grieve1b290e4a22020-11-24 20:07:01526 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
sdefresne9e147e02016-06-07 00:10:13527
528 # Provide sensible defaults in case invoker did not define any of those
529 # required variables.
sdefresne05b97ca2016-06-08 07:19:46530 if (!defined(info_plist) && !defined(info_plist_target)) {
sdefresne9e147e02016-06-07 00:10:13531 info_plist = "//testing/gtest_ios/unittest-Info.plist"
532 }
sdefresne9e147e02016-06-07 00:10:13533
Sylvain Defresne3c5a1312021-09-23 17:08:09534 if (ios_use_shared_bundle_id_for_test_apps) {
Sylvain Defresne3f48aedc2021-10-07 10:17:27535 bundle_identifier = "$ios_app_bundle_id_prefix.gtest.unittests"
Ali Jumaff45dd82021-11-08 21:53:50536 not_needed([ "_output_name" ])
Sylvain Defresne3c5a1312021-09-23 17:08:09537 } else {
Sylvain Defresne3f48aedc2021-10-07 10:17:27538 bundle_identifier = "$ios_app_bundle_id_prefix.gtest." +
539 string_replace(_output_name, "_", "-")
Sylvain Defresne3c5a1312021-09-23 17:08:09540 }
dpranke2a294622015-08-07 05:23:01541
sdefresne047490e2016-07-22 08:49:34542 if (!defined(bundle_deps)) {
543 bundle_deps = []
544 }
545 bundle_deps += [ ":$_resources_bundle_data" ]
Jeff Yoonf7f4eb42020-03-06 18:55:36546
547 if (!defined(data_deps)) {
548 data_deps = []
549 }
550
551 # Include the generate_wrapper as part of data_deps
552 data_deps += [ ":${_wrapper_output_name}" ]
Mirko Bonadei50e251d2020-09-14 18:05:46553 write_runtime_deps = _runtime_deps_file
Greg Guterman6963dc02021-04-07 05:20:59554
555 if (use_rts) {
556 data_deps += [ ":${invoker.target_name}__rts_filters" ]
557 }
dpranke2a294622015-08-07 05:23:01558 }
Yuke Liao2a9b2f0e2021-04-16 00:40:11559 } else if ((is_chromeos_ash || (is_chromeos_lacros && is_chromeos_device)) &&
560 cros_board != "") {
Dirk Pranke79d065d2020-08-29 03:28:30561 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
562
Yuke Liao2a9b2f0e2021-04-16 00:40:11563 # Building for a cros board (ie: not linux-chromeos or linux-lacros).
Benjamin Pastene3bce864e2018-04-14 01:16:32564
Benjamin Pastene3bce864e2018-04-14 01:16:32565 _gen_runner_target = "${target_name}__runner"
566 _runtime_deps_file =
567 "$root_out_dir/gen.runtime/" + get_label_info(target_name, "dir") +
568 "/" + get_label_info(target_name, "name") + ".runtime_deps"
569
Xinan Lin6be01252021-06-25 23:07:36570 _generated_script = "$root_build_dir/bin/run_" + invoker.target_name
571 if (is_skylab) {
572 generate_skylab_runner_script(_gen_runner_target) {
573 generated_script = _generated_script
574 test_exe = invoker.target_name
Yuke Liaoacb74b12021-04-23 23:37:34575 }
Xinan Lin6be01252021-06-25 23:07:36576 } else {
577 generate_runner_script(_gen_runner_target) {
578 generated_script = _generated_script
579 test_exe = invoker.target_name
580 runtime_deps_file = _runtime_deps_file
Yuke Liaoacb74b12021-04-23 23:37:34581
Xinan Lin6be01252021-06-25 23:07:36582 if (is_chromeos_lacros) {
583 # At build time, Lacros tests don't know whether they'll run on VM or
584 # HW, and instead, these flags are specified at runtime when invoking
585 # the generated runner script.
586 skip_generating_board_args = true
587 }
Greg Guterman6963dc02021-04-07 05:20:59588
Xinan Lin6be01252021-06-25 23:07:36589 if (tests_have_location_tags) {
590 data = [ "//testing/location_tags.json" ]
591 }
592
593 if (use_rts) {
594 data_deps = [ ":${invoker.target_name}__rts_filters" ]
595 }
Greg Guterman6963dc02021-04-07 05:20:59596 }
Benjamin Pastene3bce864e2018-04-14 01:16:32597 }
598
599 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01600 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
601 forward_variables_from(invoker, [ "visibility" ])
Benjamin Pastene3bce864e2018-04-14 01:16:32602 if (!defined(deps)) {
603 deps = []
604 }
605 if (!defined(data)) {
606 data = []
607 }
608
Ben Pastene41041782019-02-16 04:21:58609 # We use a special trigger script for CrOS hardware tests.
610 data += [ "//testing/trigger_scripts/chromeos_device_trigger.py" ]
611
Benjamin Pastene3bce864e2018-04-14 01:16:32612 output_name = target_name
613 write_runtime_deps = _runtime_deps_file
614 data += [ _runtime_deps_file ]
Tom Andersonce772fa2018-05-30 22:20:37615 deps += [ ":$_gen_runner_target" ]
Greg Guterman6963dc02021-04-07 05:20:59616
617 if (use_rts) {
618 if (!defined(data_deps)) {
619 data_deps = []
620 }
621 data_deps += [ ":${invoker.target_name}__rts_filters" ]
622 }
Benjamin Pastene3bce864e2018-04-14 01:16:32623 }
Yuke Liao2a9b2f0e2021-04-16 00:40:11624 } else if (is_chromeos_lacros && !is_chromeos_device) {
Yuke Liaoe703384b2020-07-16 01:05:24625 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
626 _executable = target_name
627 _gen_runner_target = "${target_name}__runner"
628
Yuke Liao32af4242020-07-16 21:48:02629 if (defined(invoker.use_xvfb)) {
630 _use_xvfb = invoker.use_xvfb
631 } else {
632 _use_xvfb = false
633 }
634
Yuke Liaod037abc2020-10-06 22:48:22635 # When use_xvfb is set by the invoker, it indicates that running this test
636 # target requires a window, and in lacros build, ash-chrome serves as the
637 # display server. Note that even though the tests themselves do not require
638 # xvfb anymore, xvfb.py is still needed to invoke the lacros test runner
639 # because ash-chrome is based on x11.
640 _use_ash_chrome = _use_xvfb
641
Yuke Liaoe703384b2020-07-16 01:05:24642 generate_wrapper(_gen_runner_target) {
Yuke Liaoe703384b2020-07-16 01:05:24643 wrapper_script = "$root_build_dir/bin/run_" + _executable
Yuke Liao32af4242020-07-16 21:48:02644
Yuke Liao2e4953cf2020-07-26 19:20:19645 data = []
Will Harrisd35e2c92021-04-07 01:42:02646 data_deps = [ "//testing:test_scripts_shared" ]
647
Yuke Liao32af4242020-07-16 21:48:02648 if (_use_xvfb) {
649 executable = "//testing/xvfb.py"
650 } else {
651 executable = "//testing/test_env.py"
652 }
Jamie Madilldd60ee62021-04-13 19:25:52653 if (tests_have_location_tags) {
654 data += [ "//testing/location_tags.json" ]
655 }
Yuke Liao32af4242020-07-16 21:48:02656
Yuke Liaoe703384b2020-07-16 01:05:24657 executable_args = [
Yuke Liao32af4242020-07-16 21:48:02658 "@WrappedPath(../../build/lacros/test_runner.py)",
Yuke Liao240816d2020-07-22 00:10:39659 "test",
Yuke Liaoe703384b2020-07-16 01:05:24660 "@WrappedPath(./${_executable})",
661 "--test-launcher-bot-mode",
662 ]
Yuke Liao32af4242020-07-16 21:48:02663
Yuke Liaof540c742020-07-29 16:28:34664 if (_use_ash_chrome) {
Sven Zheng6d089f02021-09-13 17:59:37665 executable_args += [ "--ash-chrome-path" ]
666
667 # Can't use --ash-chrome-path=path because WrappedPath
668 # won't be expanded for that usage.
669 executable_args += [ "@WrappedPath(./ash_clang_x64/test_ash_chrome)" ]
Yuke Liao240816d2020-07-22 00:10:39670 }
671
Yuke Liaoe703384b2020-07-16 01:05:24672 if (is_asan) {
673 executable_args += [ "--asan=true" ]
674 }
675 if (is_msan) {
676 executable_args += [ "--msan=true" ]
677 }
678 if (is_tsan) {
679 executable_args += [ "--tsan=true" ]
680 }
681 if (use_cfi_diag) {
682 executable_args += [ "--cfi-diag=true" ]
683 }
684
Yuke Liao2e4953cf2020-07-26 19:20:19685 data += [
Yuke Liao240816d2020-07-22 00:10:39686 "//build/lacros/test_runner.py",
Yuke Liaoe703384b2020-07-16 01:05:24687 "//.vpython",
688 ]
Greg Guterman6963dc02021-04-07 05:20:59689
690 if (use_rts) {
691 data_deps += [ ":${invoker.target_name}__rts_filters" ]
692 }
Yuke Liaoe703384b2020-07-16 01:05:24693 }
694
695 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01696 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
697 forward_variables_from(invoker, [ "visibility" ])
Yuke Liaoe703384b2020-07-16 01:05:24698 if (!defined(deps)) {
699 deps = []
700 }
701
Yuke Liaod037abc2020-10-06 22:48:22702 if (!defined(data_deps)) {
703 data_deps = []
704 }
705
Yuke Liaoe703384b2020-07-16 01:05:24706 write_runtime_deps = _runtime_deps_file
707 deps += [ ":$_gen_runner_target" ]
Yuke Liaod037abc2020-10-06 22:48:22708 if (_use_ash_chrome && also_build_ash_chrome) {
Sven Zheng74d4bd42021-06-02 02:48:56709 data_deps += [ "//chrome/test:test_ash_chrome(//build/toolchain/linux:ash_clang_x64)" ]
Yuke Liaod037abc2020-10-06 22:48:22710 }
Greg Guterman6963dc02021-04-07 05:20:59711
712 if (use_rts) {
713 data_deps += [ ":${invoker.target_name}__rts_filters" ]
714 }
Yuke Liaoe703384b2020-07-16 01:05:24715 }
Dirk Prankedd4ff742020-11-18 19:57:32716 } else if (!is_nacl) {
Dirk Pranke79d065d2020-08-29 03:28:30717 if (is_mac || is_win) {
718 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb)
719 }
720
Dirk Prankedd4ff742020-11-18 19:57:32721 _runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
722 _executable = target_name
723 _gen_runner_target = "${target_name}__runner"
Dirk Pranke31e346e2020-07-15 00:54:06724
Dirk Prankedd4ff742020-11-18 19:57:32725 if ((is_linux || is_chromeos) && defined(invoker.use_xvfb)) {
726 _use_xvfb = invoker.use_xvfb
727 } else {
728 _use_xvfb = false
729 }
730
731 generate_wrapper(_gen_runner_target) {
Dirk Prankedd4ff742020-11-18 19:57:32732 wrapper_script = "$root_build_dir/bin/run_" + _executable
733
734 data = []
Will Harrisd35e2c92021-04-07 01:42:02735 data_deps = [ "//testing:test_scripts_shared" ]
736
Dirk Prankedd4ff742020-11-18 19:57:32737 if (_use_xvfb) {
738 executable = "//testing/xvfb.py"
Dirk Pranke31e346e2020-07-15 00:54:06739 } else {
Dirk Prankedd4ff742020-11-18 19:57:32740 executable = "//testing/test_env.py"
Dirk Pranke31e346e2020-07-15 00:54:06741 }
Jamie Madilldd60ee62021-04-13 19:25:52742 if (tests_have_location_tags) {
743 data += [ "//testing/location_tags.json" ]
744 }
Dirk Pranke31e346e2020-07-15 00:54:06745
Dirk Prankedd4ff742020-11-18 19:57:32746 executable_args = [
747 "@WrappedPath(./${_executable})",
748 "--test-launcher-bot-mode",
749 ]
750 if (is_asan) {
751 executable_args += [ "--asan=true" ]
Dirk Pranke31e346e2020-07-15 00:54:06752 }
Dirk Prankedd4ff742020-11-18 19:57:32753 if (is_msan) {
754 executable_args += [ "--msan=true" ]
755 }
756 if (is_tsan) {
757 executable_args += [ "--tsan=true" ]
758 }
759 if (use_cfi_diag) {
760 executable_args += [ "--cfi-diag=true" ]
761 }
762
763 data += [ "//.vpython" ]
Greg Guterman6963dc02021-04-07 05:20:59764
765 if (use_rts) {
766 data_deps += [ ":${invoker.target_name}__rts_filters" ]
767 }
Dirk Pranke31e346e2020-07-15 00:54:06768 }
769
770 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01771 forward_variables_from(invoker,
772 "*",
773 TESTONLY_AND_VISIBILITY + [ "use_xvfb" ])
774 forward_variables_from(invoker, [ "visibility" ])
Dirk Pranke31e346e2020-07-15 00:54:06775 if (!defined(deps)) {
776 deps = []
777 }
778
Dirk Pranke31e346e2020-07-15 00:54:06779 deps += [
780 # Give tests the default manifest on Windows (a no-op elsewhere).
781 "//build/win:default_exe_manifest",
782 ]
783
Dirk Prankedd4ff742020-11-18 19:57:32784 write_runtime_deps = _runtime_deps_file
785 deps += [ ":$_gen_runner_target" ]
Greg Guterman50ed4b42021-04-08 01:15:11786
787 if (use_rts) {
788 if (!defined(data_deps)) {
789 data_deps = []
790 }
791 data_deps += [ ":${invoker.target_name}__rts_filters" ]
792 }
Dirk Prankedd4ff742020-11-18 19:57:32793 }
794 } else {
795 # This is a catch-all clause for NaCl toolchains and other random
796 # configurations that might define tests; test() in these configs
797 # will just define the underlying executables.
798 assert(!defined(invoker.use_xvfb) || !invoker.use_xvfb,
799 "use_xvfb should not be defined for a non-linux configuration")
800 executable(target_name) {
Andrew Grieve1b290e4a22020-11-24 20:07:01801 forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
802 forward_variables_from(invoker, [ "visibility" ])
Dirk Prankedd4ff742020-11-18 19:57:32803 if (!defined(deps)) {
804 deps = []
Dirk Pranke31e346e2020-07-15 00:54:06805 }
Greg Guterman6963dc02021-04-07 05:20:59806
807 if (use_rts) {
808 if (!defined(data_deps)) {
809 data_deps = []
810 }
811 data_deps += [ ":${invoker.target_name}__rts_filters" ]
812 }
Dirk Pranke31e346e2020-07-15 00:54:06813 }
qsrfb5251d12015-01-21 15:57:22814 }
815}
brettwedb6ecc2016-07-14 23:37:03816
Dirk Pranke6188075b2020-10-01 19:31:28817# Defines a type of test that invokes a script to run, rather than
818# invoking an executable.
819#
820# The script must implement the
821# [test executable API](//docs/testing/test_executable_api.md).
822#
823# The template must be passed the `script` parameter, which specifies
824# the path to the script to run. It may optionally be passed a
825# `script_args` parameter, which can be used to include a list of
826# args to be specified by default. The template will produce
827# a `$root_build_dir/run_$target_name` wrapper and write the runtime_deps
828# for the target to $root_build_dir/${target_name}.runtime_deps, as per
829# the conventions listed in the
830# [test wrapper API](//docs/testing/test_wrapper_api.md).
831template("script_test") {
Greg Guterman6963dc02021-04-07 05:20:59832 if (use_rts) {
833 action("${target_name}__rts_filters") {
834 script = "//build/add_rts_filters.py"
Greg Guterman49a42172021-04-08 22:04:53835 rts_file = "${root_build_dir}/gen/rts/${invoker.target_name}.filter"
Greg Guterman6963dc02021-04-07 05:20:59836 args = [ rebase_path(rts_file, root_build_dir) ]
837 outputs = [ rts_file ]
838 }
839 }
840
Dirk Pranke6188075b2020-10-01 19:31:28841 generate_wrapper(target_name) {
842 testonly = true
843 wrapper_script = "${root_build_dir}/bin/run_${target_name}"
844
845 executable = "//testing/test_env.py"
846
847 executable_args =
848 [ "@WrappedPath(" + rebase_path(invoker.script, root_build_dir) + ")" ]
849 if (defined(invoker.args)) {
850 executable_args += invoker.args
851 }
852
Will Harrisd35e2c92021-04-07 01:42:02853 data = [ invoker.script ]
Dirk Pranke2dd666cd2021-03-03 16:57:47854
855 if (defined(invoker.run_under_python2) && invoker.run_under_python2) {
856 use_vpython3 = false
857 data += [ "//.vpython" ]
Dirk Pranke2dd666cd2021-03-03 16:57:47858 }
859
Dirk Pranke6188075b2020-10-01 19:31:28860 if (defined(invoker.data)) {
861 data += invoker.data
862 }
Jamie Madilldd60ee62021-04-13 19:25:52863 if (tests_have_location_tags) {
864 data += [ "//testing/location_tags.json" ]
865 }
Dirk Pranke19a58732021-03-24 22:26:22866
Will Harrisd35e2c92021-04-07 01:42:02867 data_deps = [ "//testing:test_scripts_shared" ]
Dirk Pranke6188075b2020-10-01 19:31:28868 if (defined(invoker.data_deps)) {
869 data_deps += invoker.data_deps
870 }
871
872 forward_variables_from(invoker,
873 [ "*" ],
Andrew Grieve1b290e4a22020-11-24 20:07:01874 TESTONLY_AND_VISIBILITY + [
875 "data",
876 "data_deps",
877 "script",
878 "script_args",
879 ])
880 forward_variables_from(invoker, [ "visibility" ])
Dirk Pranke6188075b2020-10-01 19:31:28881
882 write_runtime_deps = "${root_build_dir}/${target_name}.runtime_deps"
Greg Guterman6963dc02021-04-07 05:20:59883
884 if (use_rts) {
885 data_deps += [ ":${invoker.target_name}__rts_filters" ]
886 }
Dirk Pranke6188075b2020-10-01 19:31:28887 }
888}
889
brettwedb6ecc2016-07-14 23:37:03890# Test defaults.
891set_defaults("test") {
892 if (is_android) {
893 configs = default_shared_library_configs
Yipeng Wang158dbc5c2017-06-30 18:16:41894 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Thomas Anderson11c1d9822019-01-15 06:32:59895 configs += [ "//build/config/android:hide_all_but_jni" ]
brettwedb6ecc2016-07-14 23:37:03896 } else {
897 configs = default_executable_configs
898 }
899}