🌐 AI搜索 & 代理 主页
blob: 56c1c6abbff4786d0fae45d645a216bff30005a2 [file] [log] [blame]
Zachary Anderson7e1b7e52016-09-23 14:47:361# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
Derek Xu846ad952024-12-20 17:00:173# BSD-style license that can be found in the LICENSE file.
Zachary Anderson7e1b7e52016-09-23 14:47:364
Jake Ehrlich773f8d52019-07-30 20:34:315import("build/config/gclient_args.gni")
Nicholas Shahan50d972b2019-10-09 23:24:216import("sdk_args.gni")
Zachary Andersona99cdab2017-11-02 19:02:187
Josh Soreff7a2ea52023-01-24 18:00:258targeting_fuchsia = target_os == "fuchsia"
James Robinson138d5872018-01-18 06:05:569
Zachary Anderson7e1b7e52016-09-23 14:47:3610# This target will be built if no target is specified when invoking ninja.
11group("default") {
Josh Soreff7a2ea52023-01-24 18:00:2512 if (targeting_fuchsia) {
Zachary Anderson7f55ad82016-12-13 21:02:5213 # Fuchsia has run_vm_tests marked testonly.
14 testonly = true
15 }
asivae33d0232020-03-10 21:56:1116 deps = [ ":runtime" ]
Zachary Anderson7e1b7e52016-09-23 14:47:3617}
18
Zachary Anderson7c784ce2016-09-29 20:23:0019group("most") {
lambdabaad3fbbf82019-07-31 12:54:5220 import("runtime/runtime_args.gni")
Josh Soreff7a2ea52023-01-24 18:00:2521 if (targeting_fuchsia) {
Zachary Anderson7f55ad82016-12-13 21:02:5222 # Fuchsia has run_vm_tests marked testonly.
23 testonly = true
24 }
Zachary Anderson7c784ce2016-09-29 20:23:0025 deps = [
Alexander Thomasf38081d2021-03-19 12:03:4826 ":analysis_server",
Zachary Anderson7c784ce2016-09-29 20:23:0027 ":create_sdk",
28 ":dart2js",
29 ":dartanalyzer",
Nicholas Shahan3a65ac92023-08-29 21:33:4830 ":ddc",
Zachary Anderson7c784ce2016-09-29 20:23:0031 ":runtime",
Zachary Anderson7c784ce2016-09-29 20:23:0032 ]
33}
34
Zachary Anderson7e1b7e52016-09-23 14:47:3635group("runtime") {
asivabc7220a2018-06-18 22:31:3236 import("runtime/runtime_args.gni")
37
Josh Soreff7a2ea52023-01-24 18:00:2538 if (targeting_fuchsia) {
Zachary Anderson7f55ad82016-12-13 21:02:5239 # Fuchsia has run_vm_tests marked testonly.
40 testonly = true
41 }
Chris Evans23b1f382022-03-09 14:17:4442
Zachary Anderson7e1b7e52016-09-23 14:47:3643 deps = [
Zachary Anderson7c784ce2016-09-29 20:23:0044 "runtime/bin:dart",
Alexander Aprelev34087a62019-09-27 21:14:1145 "runtime/bin:ffi_test_dynamic_library",
46 "runtime/bin:ffi_test_functions",
Zachary Anderson7c784ce2016-09-29 20:23:0047 "runtime/bin:process_test",
Zachary Andersonc1313a52016-10-26 15:50:5448 "runtime/bin:run_vm_tests",
Zachary Anderson02eebb02017-11-01 21:13:2849 "runtime/vm:kernel_platform_files($host_toolchain)",
Ivan Inozemtsev6e33c952025-01-28 11:53:4050 "samples/embedder:kernel",
Liam Appelbebaaf5e12023-09-28 22:41:4251 "samples/ffi/http:fake_http",
Alexander Aprelev50e0e0d2025-05-06 20:28:4452 "samples/ffi/httpIG:fake_httpIG",
Derek Xu7f826672023-08-25 16:02:2853 "utils/dartdev:dartdev",
Ryan Macnak9eb216a2017-01-31 17:47:5154 "utils/kernel-service:kernel-service",
Zachary Anderson7c784ce2016-09-29 20:23:0055 ]
Derek Xu846ad952024-12-20 17:00:1756
57 # The following dependencies allow dartdev to start the resident frontend
Ryan Macnak63758442025-04-16 19:35:4058 # server and DDS.
Derek Xu846ad952024-12-20 17:00:1759 if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
Ryan Macnak63758442025-04-16 19:35:4060 deps += [
61 "runtime/bin:dartaotruntime",
62 "runtime/bin:dartaotruntime_product",
Ryan Macnak63758442025-04-16 19:35:4063 "utils/dds:dds_aot",
Ryan Macnak63758442025-04-16 19:35:4064 "utils/kernel-service:frontend_server_aot_product",
65 ]
Derek Xu846ad952024-12-20 17:00:1766 } else {
Ryan Macnak63758442025-04-16 19:35:4067 deps += [
68 "utils/dds:dds",
Ryan Macnak63758442025-04-16 19:35:4069 "utils/kernel-service:frontend_server",
70 ]
Derek Xu846ad952024-12-20 17:00:1771 }
72
Ivan Inozemtsev6e33c952025-01-28 11:53:4073 # AOT samples use dlopen to load AOT snapshots and it works only on
74 # 64-bit Linux right now.
Ivan Inozemtseve5349832025-02-04 07:31:2175 if ((is_linux || is_mac) &&
76 (dart_target_arch == "x64" || dart_target_arch == "arm64")) {
Ivan Inozemtsev6e33c952025-01-28 11:53:4077 deps += [ "samples/embedder:aot" ]
78 }
79
Martin Kustermannd3d83e62024-02-15 14:09:3780 if (!is_win) {
81 # The test isn't run on windows
82 deps += [ "runtime/bin:entrypoints_verification_test" ]
83 }
Ben Konyi48aa0202020-05-05 22:27:0984
Chris Evans0b8ab172023-01-24 14:07:2685 # This flag is set in runtime/runtime_args.gni
86 # The analyze_snapshot tool is only supported on 64 bit AOT builds running
87 # under linux and android platforms
88 if (build_analyze_snapshot) {
Martin Kustermannb15da0b2023-01-27 12:44:3089 deps += [
90 # The `analyze_snapshot` tests require the `analyze_snapshot` as well as
91 # `gen_snapshot` binaries.
92 "runtime/bin:analyze_snapshot",
93 "runtime/bin:analyze_snapshot($host_toolchain)",
94 "runtime/bin:gen_snapshot",
95 "runtime/bin:gen_snapshot($host_toolchain)",
96 ]
Chris Evans23b1f382022-03-09 14:17:4497 }
98
Zach Anderson5dc1f8d2021-05-27 21:50:2499 if (is_linux || is_android) {
100 deps += [ "runtime/bin:abstract_socket_test" ]
Ryan Macnak573fad42023-10-31 17:11:51101 } else if (is_fuchsia) {
102 deps += [ ":fuchsia_test_package" ]
Zach Anderson5dc1f8d2021-05-27 21:50:24103 }
Zachary Anderson7c784ce2016-09-29 20:23:00104}
105
Daco Harkes9f96aed2020-11-16 16:10:55106# A separate target and not included in group("runtime"). This way the target\
107# "runtime" does not get many executables extra as build output.
108group("run_ffi_unit_tests") {
109 deps = [ "runtime/bin/ffi_unit_test:run_ffi_unit_tests" ]
110}
111
Zachary Anderson7c784ce2016-09-29 20:23:00112group("runtime_precompiled") {
Alexander Markov3d8829f2024-08-15 15:28:25113 import("runtime/runtime_args.gni")
Zachary Anderson7c784ce2016-09-29 20:23:00114 deps = [
asiva8b2b6b22024-11-08 04:36:23115 "runtime/bin:dartaotruntime",
Alexander Aprelevb614a7e2024-05-10 15:23:56116 "runtime/bin:gen_snapshot",
117 "runtime/bin:gen_snapshot($host_toolchain)",
Florian Schneiderc7aba7d2017-01-10 00:58:09118 "runtime/bin:process_test",
Alexander Aprelevb614a7e2024-05-10 15:23:56119 "runtime/vm:kernel_platform_files($host_toolchain)",
Zachary Anderson7c784ce2016-09-29 20:23:00120 ]
Zach Anderson5dc1f8d2021-05-27 21:50:24121 if (is_linux || is_android) {
122 deps += [ "runtime/bin:abstract_socket_test" ]
123 }
Alexander Markov3d8829f2024-08-15 15:28:25124 if (dart_dynamic_modules) {
125 deps += [ "utils/dart2bytecode:dart2bytecode_snapshot" ]
126 deps += [ "utils/dynamic_module_runner:dynamic_module_runner_snapshot" ]
127 }
Zachary Anderson7c784ce2016-09-29 20:23:00128}
129
Leaf Petersend44457f2020-06-16 23:37:36130group("create_sdk") {
131 public_deps = [ "sdk:create_sdk" ]
Robert Nystrom6d867792019-09-25 00:43:13132}
133
Leaf Petersend44457f2020-06-16 23:37:36134group("create_platform_sdk") {
135 public_deps = [ "sdk:create_platform_sdk" ]
Ben Konyi1960d212020-05-12 23:37:19136}
137
Zachary Anderson7c784ce2016-09-29 20:23:00138group("dart2js") {
asiva8b2b6b22024-11-08 04:36:23139 import("runtime/runtime_args.gni")
140 if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
141 deps = [
142 ":runtime_precompiled",
143 "utils/compiler:dart2js_sdk_aot",
144 ]
145 } else {
146 deps = [ "utils/compiler:dart2js" ]
147 }
Zachary Anderson7c784ce2016-09-29 20:23:00148}
149
Joshua Littfd39eab2022-10-05 11:55:22150group("dart2wasm_platform") {
Aske Simon Christensen6c760422022-05-10 10:06:06151 deps = [
152 ":runtime_precompiled",
Joshua Litt9e37c2b2023-07-18 19:34:38153 "utils/dart2wasm:compile_dart2wasm_js_compatibility_platform",
Aske Simon Christensen6c760422022-05-10 10:06:06154 "utils/dart2wasm:compile_dart2wasm_platform",
Aske Simon Christensen6c760422022-05-10 10:06:06155 "utils/dart2wasm:dart2wasm_snapshot",
Joshua Littfd39eab2022-10-05 11:55:22156 ]
Joshua Litt1ed2a072022-10-26 17:04:17157 if (defined(is_product)) {
158 if (is_product) {
159 deps += [ "utils/dart2wasm:dart2wasm_product_snapshot" ]
160 } else {
161 deps += [ "utils/dart2wasm:dart2wasm_asserts_snapshot" ]
162 }
Ryan Macnak8d604952022-10-10 19:14:58163 }
Joshua Littfd39eab2022-10-05 11:55:22164}
165
166group("dart2wasm") {
167 deps = [
168 ":dart2wasm_platform",
Ömer Sinan Ağacanaffc3392022-09-23 09:41:22169 "utils/dart2wasm:test_wasm_modules",
Aske Simon Christensen6c760422022-05-10 10:06:06170 ]
171}
172
Martin Kustermann0fdeaee2022-11-18 10:58:54173group("dart2wasm_benchmark") {
174 deps = [
175 ":dart2wasm_platform",
176 "third_party/binaryen:wasm-opt",
177 ]
178}
179
Zachary Anderson7c784ce2016-09-29 20:23:00180group("dartanalyzer") {
asivae33d0232020-03-10 21:56:11181 deps = [ "utils/dartanalyzer" ]
Zachary Anderson7c784ce2016-09-29 20:23:00182}
183
Nicholas Shahanf4e94962023-07-25 00:19:52184group("ddc") {
asiva8b2b6b22024-11-08 04:36:23185 import("runtime/runtime_args.gni")
186 if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
187 deps = [
188 ":runtime_precompiled",
189 "utils/bazel:kernel_worker_aot",
190 "utils/ddc:dartdevc_aot",
191 ]
192 } else {
193 deps = [
194 "utils/bazel:kernel_worker",
195 "utils/ddc:dartdevc",
196 ]
197 }
Nicholas Shahanf4e94962023-07-25 00:19:52198}
199
Zachary Anderson7c784ce2016-09-29 20:23:00200group("analysis_server") {
asivae33d0232020-03-10 21:56:11201 deps = [ "utils/analysis_server" ]
Zachary Anderson7c784ce2016-09-29 20:23:00202}
203
Vyacheslav Egorova4dd3142024-05-24 09:40:39204group("tools") {
205 deps = [
206 "utils:compile_platform.exe",
207 "utils:gen_kernel.exe",
208 ]
209}
210
Zachary Anderson7c784ce2016-09-29 20:23:00211# This is the target that is built on the dart2js build bots.
212# It must depend on anything that is required by the dart2js
213# test suites.
214group("dart2js_bot") {
Nicholas Shahanc1ce43f2025-01-08 23:10:26215 deps = [
216 ":create_sdk",
Mayank Patke0c55c7e2025-02-26 23:57:55217 "utils/compiler:compile_dart2js_platform",
Nicholas Shahanc1ce43f2025-01-08 23:10:26218 ]
Zachary Anderson7c784ce2016-09-29 20:23:00219}
220
Liam Appelbe089d6fc2020-07-10 18:10:05221if (is_fuchsia) {
Zijie He690b2ef2023-11-13 21:24:08222 import("third_party/fuchsia/gn-sdk/src/component.gni")
223 import("third_party/fuchsia/gn-sdk/src/package.gni")
Ryan Macnak4ab313c2025-04-01 16:50:12224 import("utils/aot_snapshot.gni")
Ryan Macnakd42a4b72024-04-30 17:37:45225 import("utils/application_snapshot.gni")
226
Ryan Macnak4ab313c2025-04-01 16:50:12227 # TODO(b/399714829): Test packages should be created at test-time, not build-time.
228
Ryan Macnakd42a4b72024-04-30 17:37:45229 # tests/ffi/**_test.dart except those with compile-time errors
230 test_sources = [
Ryan Macnakd42a4b72024-04-30 17:37:45231 "tests/ffi/abi_specific_int_test.dart",
232 "tests/ffi/abi_test.dart",
233 "tests/ffi/address_of_array_generated_test.dart",
Daco Harkese65551b2024-08-28 10:40:21234 "tests/ffi/address_of_cast_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45235 "tests/ffi/address_of_struct_generated_test.dart",
236 "tests/ffi/address_of_test.dart",
237 "tests/ffi/address_of_typeddata_generated_test.dart",
238 "tests/ffi/aliasing_test.dart",
239 "tests/ffi/allocator_test.dart",
Michael Goderbauerc3260652025-03-20 13:38:27240 "tests/ffi/array_compound_elements_test.dart",
241 "tests/ffi/array_primitive_elements_generated_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45242 "tests/ffi/async_void_function_callbacks_test.dart",
243 "tests/ffi/bool_test.dart",
244 "tests/ffi/c_types_test.dart",
245 "tests/ffi/callback_unwind_error_test.dart",
246 "tests/ffi/calloc_test.dart",
247 "tests/ffi/data_not_asan_test.dart",
248 "tests/ffi/data_test.dart",
249 "tests/ffi/deeply_immutable_c_api_finalizer_test.dart",
250 "tests/ffi/dl_api_exit_enter_isolate_test.dart",
251 "tests/ffi/dylib_close_test.dart",
252 "tests/ffi/dylib_isolates_test.dart",
253 "tests/ffi/dylib_open_test.dart",
254 "tests/ffi/expando_test.dart",
255 "tests/ffi/extension_methods_test.dart",
256 "tests/ffi/external_typed_data_finalizer_test.dart",
257 "tests/ffi/external_typed_data_test.dart",
258 "tests/ffi/ffi_callback_unique_test.dart",
259 "tests/ffi/ffi_induce_a_crash_test.dart",
260 "tests/ffi/ffi_native_test.dart",
261 "tests/ffi/finalizer_external_size_accounting_test.dart",
262 "tests/ffi/function_callbacks_many_test.dart",
263 "tests/ffi/function_callbacks_structs_by_value_generated_test.dart",
264 "tests/ffi/function_callbacks_structs_by_value_native_callable_generated_test.dart",
265 "tests/ffi/function_callbacks_structs_by_value_test.dart",
266 "tests/ffi/function_callbacks_subtype_test.dart",
267 "tests/ffi/function_callbacks_test.dart",
268 "tests/ffi/function_callbacks_varargs_generated_test.dart",
269 "tests/ffi/function_callbacks_varargs_native_callable_generated_test.dart",
270 "tests/ffi/function_callbacks_very_many_test.dart",
271 "tests/ffi/function_struct_by_value_out_of_bounds_test.dart",
272 "tests/ffi/function_structs_by_value_generated_args_leaf_test.dart",
273 "tests/ffi/function_structs_by_value_generated_args_native_leaf_test.dart",
274 "tests/ffi/function_structs_by_value_generated_args_native_test.dart",
275 "tests/ffi/function_structs_by_value_generated_args_test.dart",
Halil Durmusbb483f32024-12-09 22:02:56276 "tests/ffi/function_structs_by_value_generated_compounds_sizeof_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45277 "tests/ffi/function_structs_by_value_generated_ret_arg_leaf_test.dart",
278 "tests/ffi/function_structs_by_value_generated_ret_arg_native_leaf_test.dart",
279 "tests/ffi/function_structs_by_value_generated_ret_arg_native_test.dart",
280 "tests/ffi/function_structs_by_value_generated_ret_arg_test.dart",
281 "tests/ffi/function_structs_by_value_generated_ret_leaf_test.dart",
282 "tests/ffi/function_structs_by_value_generated_ret_native_leaf_test.dart",
283 "tests/ffi/function_structs_by_value_generated_ret_native_test.dart",
284 "tests/ffi/function_structs_by_value_generated_ret_test.dart",
285 "tests/ffi/function_structs_test.dart",
286 "tests/ffi/function_test.dart",
287 "tests/ffi/function_varargs_generated_leaf_test.dart",
288 "tests/ffi/function_varargs_generated_native_leaf_test.dart",
289 "tests/ffi/function_varargs_generated_native_test.dart",
290 "tests/ffi/function_varargs_generated_test.dart",
291 "tests/ffi/function_varargs_name_test.dart",
292 "tests/ffi/function_varargs_test.dart",
293 "tests/ffi/function_very_many_test.dart",
294 "tests/ffi/hardfp_test.dart",
295 "tests/ffi/has_symbol_test.dart",
296 "tests/ffi/inline_array_multi_dimensional_test.dart",
297 "tests/ffi/inline_array_test.dart",
Daco Harkes965234c2024-08-06 07:50:49298 "tests/ffi/inline_array_variable_length_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45299 "tests/ffi/invoke_callback_after_suspension_test.dart",
300 "tests/ffi/isolate_local_function_callbacks_test.dart",
301 "tests/ffi/msan_test.dart",
302 "tests/ffi/native_assets/asset_absolute_test.dart",
303 "tests/ffi/native_assets/asset_executable_test.dart",
304 "tests/ffi/native_assets/asset_library_annotation_test.dart",
305 "tests/ffi/native_assets/asset_process_test.dart",
306 "tests/ffi/native_assets/asset_relative_test.dart",
307 "tests/ffi/native_assets/asset_system_test.dart",
308 "tests/ffi/native_assets/infer_native_assets_yaml_dart_kernel_snapshot_test.dart",
309 "tests/ffi/native_assets/infer_native_assets_yaml_isolate_spawnuri_2_test.dart",
310 "tests/ffi/native_assets/infer_native_assets_yaml_isolate_spawnuri_3_test.dart",
311 "tests/ffi/native_assets/infer_native_assets_yaml_isolate_spawnuri_test.dart",
312 "tests/ffi/native_assets/infer_native_assets_yaml_process_run_test.dart",
313 "tests/ffi/native_assets/process_test.dart",
314 "tests/ffi/native_callables_async_structs_by_value_generated_test.dart",
315 "tests/ffi/native_callables_sync_structs_by_value_generated_test.dart",
316 "tests/ffi/native_effect_test.dart",
317 "tests/ffi/negative_function_test.dart",
318 "tests/ffi/pointer_arithmetic_operators_test.dart",
319 "tests/ffi/regress_37254_test.dart",
320 "tests/ffi/regress_39044_test.dart",
321 "tests/ffi/regress_39063_test.dart",
322 "tests/ffi/regress_39885_test.dart",
323 "tests/ffi/regress_40537_test.dart",
324 "tests/ffi/regress_43016_test.dart",
325 "tests/ffi/regress_43693_test.dart",
326 "tests/ffi/regress_45189_test.dart",
327 "tests/ffi/regress_45198_test.dart",
328 "tests/ffi/regress_45507_test.dart",
329 "tests/ffi/regress_45988_test.dart",
330 "tests/ffi/regress_46004_test.dart",
331 "tests/ffi/regress_46127_test.dart",
332 "tests/ffi/regress_47594_test.dart",
333 "tests/ffi/regress_47673_test.dart",
334 "tests/ffi/regress_49402_test.dart",
335 "tests/ffi/regress_49684_test.dart",
336 "tests/ffi/regress_51315_test.dart",
337 "tests/ffi/regress_51321_test.dart",
338 "tests/ffi/regress_51504_test.dart",
339 "tests/ffi/regress_51538_2_test.dart",
340 "tests/ffi/regress_51538_3_test.dart",
341 "tests/ffi/regress_51538_test.dart",
342 "tests/ffi/regress_52298_test.dart",
343 "tests/ffi/regress_52399_test.dart",
Daco Harkes6378a262024-08-23 07:03:15344 "tests/ffi/regress_56412_2_test.dart",
345 "tests/ffi/regress_56412_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45346 "tests/ffi/regress_b_261224444_test.dart",
347 "tests/ffi/regress_flutter79441_test.dart",
348 "tests/ffi/regress_flutter97301_test.dart",
349 "tests/ffi/regress_jump_to_frame_test.dart",
350 "tests/ffi/sizeof_test.dart",
351 "tests/ffi/snapshot_test.dart",
352 "tests/ffi/stacktrace_regress_37910_test.dart",
353 "tests/ffi/structs_nested_test.dart",
354 "tests/ffi/structs_nnbd_workaround_test.dart",
355 "tests/ffi/structs_packed_test.dart",
356 "tests/ffi/structs_test.dart",
357 "tests/ffi/structs_typed_data_test.dart",
358 "tests/ffi/unaligned_test.dart",
359 "tests/ffi/variance_function_test.dart",
Ryan Macnak3257d562025-02-19 18:46:03360 "tests/ffi/vmspecific_callback_unwind_error_through_handle_test.dart",
Ryan Macnakd42a4b72024-04-30 17:37:45361 "tests/ffi/vmspecific_deprecated_funcs_test.dart",
362 "tests/ffi/vmspecific_dynamic_library_test.dart",
363 "tests/ffi/vmspecific_enable_ffi_test.dart",
364 "tests/ffi/vmspecific_ffi_native_handles_test.dart",
365 "tests/ffi/vmspecific_ffi_native_test.dart",
366 "tests/ffi/vmspecific_function_callbacks_exit_test.dart",
367 "tests/ffi/vmspecific_function_callbacks_test.dart",
368 "tests/ffi/vmspecific_function_gc_test.dart",
369 "tests/ffi/vmspecific_function_test.dart",
370 "tests/ffi/vmspecific_handle_dynamically_linked_test.dart",
371 "tests/ffi/vmspecific_handle_test.dart",
372 "tests/ffi/vmspecific_highmem_32bit_test.dart",
373 "tests/ffi/vmspecific_leaf_call_test.dart",
374 "tests/ffi/vmspecific_native_finalizer_2_test.dart",
375 "tests/ffi/vmspecific_native_finalizer_deeply_immutable_test.dart",
376 "tests/ffi/vmspecific_native_finalizer_isolate_groups_test.dart",
377 "tests/ffi/vmspecific_native_finalizer_isolates_test.dart",
378 "tests/ffi/vmspecific_native_finalizer_test.dart",
379 "tests/ffi/vmspecific_object_gc_test.dart",
380 "tests/ffi/vmspecific_pointer_load_il_test.dart",
381 "tests/ffi/vmspecific_regress_37100_test.dart",
382 "tests/ffi/vmspecific_regress_37511_callbacks_test.dart",
383 "tests/ffi/vmspecific_regress_37511_test.dart",
384 "tests/ffi/vmspecific_regress_37780_test.dart",
385 "tests/ffi/vmspecific_regress_51794_test.dart",
386 "tests/ffi/vmspecific_send_port_id_test.dart",
387 ]
388
389 test_deps = []
390 test_resources = []
391 foreach(test_source, test_sources) {
392 label = string_replace(test_source, "/", "_")
Ryan Macnak4ab313c2025-04-01 16:50:12393 aot_label = label + "_aot"
Ryan Macnakd42a4b72024-04-30 17:37:45394
395 application_snapshot(label) {
396 dart_snapshot_kind = "kernel"
397 main_dart = test_source
398 training_args = [] # Not used
399 output = "$target_gen_dir/$test_source.dill"
400 }
Ryan Macnak4ab313c2025-04-01 16:50:12401 aot_snapshot(aot_label) {
402 main_dart = test_source
403 output = "$target_gen_dir/$test_source.elf"
404 }
Ryan Macnakd42a4b72024-04-30 17:37:45405
Ryan Macnak4ab313c2025-04-01 16:50:12406 test_deps += [
407 ":$aot_label",
408 ":$label",
409 ]
Ryan Macnakd42a4b72024-04-30 17:37:45410 test_resources += [
411 {
412 path = rebase_path("$target_gen_dir/$test_source.dill")
413 dest = "data/$test_source"
414 },
Ryan Macnak4ab313c2025-04-01 16:50:12415 {
416 path = rebase_path("$target_gen_dir/$test_source.elf")
417 dest = "data/$test_source.elf"
418 },
Ryan Macnakd42a4b72024-04-30 17:37:45419 ]
420 }
Liam Appelbe089d6fc2020-07-10 18:10:05421
Ryan Macnak573fad42023-10-31 17:11:51422 test_binaries = [
asiva97bc4012025-07-10 06:08:28423 "dart",
asiva8b2b6b22024-11-08 04:36:23424 "dartaotruntime",
Ryan Macnak573fad42023-10-31 17:11:51425 "run_vm_tests",
426 ]
Liam Appelbe6fc75e62020-07-15 20:44:06427
Ryan Macnak573fad42023-10-31 17:11:51428 foreach(binary, test_binaries) {
429 fuchsia_component("${binary}_test_component") {
Daco Harkes550d5802020-12-10 12:15:17430 testonly = true
Ryan Macnak573fad42023-10-31 17:11:51431 manifest = "runtime/bin/${binary}_test_component.cml"
432 data_deps = [
433 "runtime/bin:${binary}",
434 "runtime/bin:ffi_test_dynamic_library",
435 "runtime/bin:ffi_test_functions",
436 ]
437 library_files = [
438 "libffi_test_dynamic_library.so",
439 "libffi_test_functions.so",
440 ]
Daco Harkes550d5802020-12-10 12:15:17441 resource_files = [
442 ".dart_tool/package_config.json",
Daco Harkes550d5802020-12-10 12:15:17443 "tools/addlatexhash.dart",
444 ]
Daco Harkes550d5802020-12-10 12:15:17445 resources = []
446 foreach(file, library_files) {
447 resources += [
448 {
449 path = root_out_dir + "/" + file
450 dest = "lib/" + file
451 },
452 ]
453 }
454 foreach(file, resource_files) {
455 resources += [
456 {
457 path = file
458 dest = "data/" + file
459 },
460 ]
461 }
Ryan Macnakd42a4b72024-04-30 17:37:45462 deps = test_deps
463 resources += test_resources
Daco Harkes550d5802020-12-10 12:15:17464 }
465 }
466
Ryan Macnak573fad42023-10-31 17:11:51467 fuchsia_package("fuchsia_test_package") {
468 testonly = true
469 if (is_debug) {
470 package_name = "dart_test_debug"
471 } else if (is_release) {
472 package_name = "dart_test_release"
473 } else if (is_product) {
474 package_name = "dart_test_product"
475 }
476 deps = []
477 foreach(binary, test_binaries) {
478 deps += [ ":${binary}_test_component" ]
479 }
Daco Harkes550d5802020-12-10 12:15:17480 }
Liam Appelbe089d6fc2020-07-10 18:10:05481}
Ryan Macnak208b5d82025-05-21 21:25:28482
483if (is_linux) {
484 group("debian_package") {
485 public_deps = [ "tools/debian_package" ]
486 }
487}