| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 1 | # 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 Xu | 846ad95 | 2024-12-20 17:00:17 | [diff] [blame] | 3 | # BSD-style license that can be found in the LICENSE file. |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 4 | |
| Jake Ehrlich | 773f8d5 | 2019-07-30 20:34:31 | [diff] [blame] | 5 | import("build/config/gclient_args.gni") |
| Nicholas Shahan | 50d972b | 2019-10-09 23:24:21 | [diff] [blame] | 6 | import("sdk_args.gni") |
| Zachary Anderson | a99cdab | 2017-11-02 19:02:18 | [diff] [blame] | 7 | |
| Josh Soref | f7a2ea5 | 2023-01-24 18:00:25 | [diff] [blame] | 8 | targeting_fuchsia = target_os == "fuchsia" |
| James Robinson | 138d587 | 2018-01-18 06:05:56 | [diff] [blame] | 9 | |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 10 | # This target will be built if no target is specified when invoking ninja. |
| 11 | group("default") { |
| Josh Soref | f7a2ea5 | 2023-01-24 18:00:25 | [diff] [blame] | 12 | if (targeting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 13 | # Fuchsia has run_vm_tests marked testonly. |
| 14 | testonly = true |
| 15 | } |
| asiva | e33d023 | 2020-03-10 21:56:11 | [diff] [blame] | 16 | deps = [ ":runtime" ] |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 17 | } |
| 18 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 19 | group("most") { |
| lambdabaa | d3fbbf8 | 2019-07-31 12:54:52 | [diff] [blame] | 20 | import("runtime/runtime_args.gni") |
| Josh Soref | f7a2ea5 | 2023-01-24 18:00:25 | [diff] [blame] | 21 | if (targeting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 22 | # Fuchsia has run_vm_tests marked testonly. |
| 23 | testonly = true |
| 24 | } |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 25 | deps = [ |
| Alexander Thomas | f38081d | 2021-03-19 12:03:48 | [diff] [blame] | 26 | ":analysis_server", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 27 | ":create_sdk", |
| 28 | ":dart2js", |
| 29 | ":dartanalyzer", |
| Nicholas Shahan | 3a65ac9 | 2023-08-29 21:33:48 | [diff] [blame] | 30 | ":ddc", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 31 | ":runtime", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 32 | ] |
| 33 | } |
| 34 | |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 35 | group("runtime") { |
| asiva | bc7220a | 2018-06-18 22:31:32 | [diff] [blame] | 36 | import("runtime/runtime_args.gni") |
| 37 | |
| Josh Soref | f7a2ea5 | 2023-01-24 18:00:25 | [diff] [blame] | 38 | if (targeting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 39 | # Fuchsia has run_vm_tests marked testonly. |
| 40 | testonly = true |
| 41 | } |
| Chris Evans | 23b1f38 | 2022-03-09 14:17:44 | [diff] [blame] | 42 | |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 43 | deps = [ |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 44 | "runtime/bin:dart", |
| Alexander Aprelev | 34087a6 | 2019-09-27 21:14:11 | [diff] [blame] | 45 | "runtime/bin:ffi_test_dynamic_library", |
| 46 | "runtime/bin:ffi_test_functions", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 47 | "runtime/bin:process_test", |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 48 | "runtime/bin:run_vm_tests", |
| Zachary Anderson | 02eebb0 | 2017-11-01 21:13:28 | [diff] [blame] | 49 | "runtime/vm:kernel_platform_files($host_toolchain)", |
| Ivan Inozemtsev | 6e33c95 | 2025-01-28 11:53:40 | [diff] [blame] | 50 | "samples/embedder:kernel", |
| Liam Appelbe | baaf5e1 | 2023-09-28 22:41:42 | [diff] [blame] | 51 | "samples/ffi/http:fake_http", |
| Alexander Aprelev | 50e0e0d | 2025-05-06 20:28:44 | [diff] [blame] | 52 | "samples/ffi/httpIG:fake_httpIG", |
| Derek Xu | 7f82667 | 2023-08-25 16:02:28 | [diff] [blame] | 53 | "utils/dartdev:dartdev", |
| Ryan Macnak | 9eb216a | 2017-01-31 17:47:51 | [diff] [blame] | 54 | "utils/kernel-service:kernel-service", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 55 | ] |
| Derek Xu | 846ad95 | 2024-12-20 17:00:17 | [diff] [blame] | 56 | |
| 57 | # The following dependencies allow dartdev to start the resident frontend |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 58 | # server and DDS. |
| Derek Xu | 846ad95 | 2024-12-20 17:00:17 | [diff] [blame] | 59 | if (dart_target_arch != "ia32" && dart_target_arch != "x86") { |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 60 | deps += [ |
| 61 | "runtime/bin:dartaotruntime", |
| 62 | "runtime/bin:dartaotruntime_product", |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 63 | "utils/dds:dds_aot", |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 64 | "utils/kernel-service:frontend_server_aot_product", |
| 65 | ] |
| Derek Xu | 846ad95 | 2024-12-20 17:00:17 | [diff] [blame] | 66 | } else { |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 67 | deps += [ |
| 68 | "utils/dds:dds", |
| Ryan Macnak | 6375844 | 2025-04-16 19:35:40 | [diff] [blame] | 69 | "utils/kernel-service:frontend_server", |
| 70 | ] |
| Derek Xu | 846ad95 | 2024-12-20 17:00:17 | [diff] [blame] | 71 | } |
| 72 | |
| Ivan Inozemtsev | 6e33c95 | 2025-01-28 11:53:40 | [diff] [blame] | 73 | # AOT samples use dlopen to load AOT snapshots and it works only on |
| 74 | # 64-bit Linux right now. |
| Ivan Inozemtsev | e534983 | 2025-02-04 07:31:21 | [diff] [blame] | 75 | if ((is_linux || is_mac) && |
| 76 | (dart_target_arch == "x64" || dart_target_arch == "arm64")) { |
| Ivan Inozemtsev | 6e33c95 | 2025-01-28 11:53:40 | [diff] [blame] | 77 | deps += [ "samples/embedder:aot" ] |
| 78 | } |
| 79 | |
| Martin Kustermann | d3d83e6 | 2024-02-15 14:09:37 | [diff] [blame] | 80 | if (!is_win) { |
| 81 | # The test isn't run on windows |
| 82 | deps += [ "runtime/bin:entrypoints_verification_test" ] |
| 83 | } |
| Ben Konyi | 48aa020 | 2020-05-05 22:27:09 | [diff] [blame] | 84 | |
| Chris Evans | 0b8ab17 | 2023-01-24 14:07:26 | [diff] [blame] | 85 | # 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 Kustermann | b15da0b | 2023-01-27 12:44:30 | [diff] [blame] | 89 | 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 Evans | 23b1f38 | 2022-03-09 14:17:44 | [diff] [blame] | 97 | } |
| 98 | |
| Zach Anderson | 5dc1f8d | 2021-05-27 21:50:24 | [diff] [blame] | 99 | if (is_linux || is_android) { |
| 100 | deps += [ "runtime/bin:abstract_socket_test" ] |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 101 | } else if (is_fuchsia) { |
| 102 | deps += [ ":fuchsia_test_package" ] |
| Zach Anderson | 5dc1f8d | 2021-05-27 21:50:24 | [diff] [blame] | 103 | } |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 104 | } |
| 105 | |
| Daco Harkes | 9f96aed | 2020-11-16 16:10:55 | [diff] [blame] | 106 | # A separate target and not included in group("runtime"). This way the target\ |
| 107 | # "runtime" does not get many executables extra as build output. |
| 108 | group("run_ffi_unit_tests") { |
| 109 | deps = [ "runtime/bin/ffi_unit_test:run_ffi_unit_tests" ] |
| 110 | } |
| 111 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 112 | group("runtime_precompiled") { |
| Alexander Markov | 3d8829f | 2024-08-15 15:28:25 | [diff] [blame] | 113 | import("runtime/runtime_args.gni") |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 114 | deps = [ |
| asiva | 8b2b6b2 | 2024-11-08 04:36:23 | [diff] [blame] | 115 | "runtime/bin:dartaotruntime", |
| Alexander Aprelev | b614a7e | 2024-05-10 15:23:56 | [diff] [blame] | 116 | "runtime/bin:gen_snapshot", |
| 117 | "runtime/bin:gen_snapshot($host_toolchain)", |
| Florian Schneider | c7aba7d | 2017-01-10 00:58:09 | [diff] [blame] | 118 | "runtime/bin:process_test", |
| Alexander Aprelev | b614a7e | 2024-05-10 15:23:56 | [diff] [blame] | 119 | "runtime/vm:kernel_platform_files($host_toolchain)", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 120 | ] |
| Zach Anderson | 5dc1f8d | 2021-05-27 21:50:24 | [diff] [blame] | 121 | if (is_linux || is_android) { |
| 122 | deps += [ "runtime/bin:abstract_socket_test" ] |
| 123 | } |
| Alexander Markov | 3d8829f | 2024-08-15 15:28:25 | [diff] [blame] | 124 | if (dart_dynamic_modules) { |
| 125 | deps += [ "utils/dart2bytecode:dart2bytecode_snapshot" ] |
| 126 | deps += [ "utils/dynamic_module_runner:dynamic_module_runner_snapshot" ] |
| 127 | } |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 128 | } |
| 129 | |
| Leaf Petersen | d44457f | 2020-06-16 23:37:36 | [diff] [blame] | 130 | group("create_sdk") { |
| 131 | public_deps = [ "sdk:create_sdk" ] |
| Robert Nystrom | 6d86779 | 2019-09-25 00:43:13 | [diff] [blame] | 132 | } |
| 133 | |
| Leaf Petersen | d44457f | 2020-06-16 23:37:36 | [diff] [blame] | 134 | group("create_platform_sdk") { |
| 135 | public_deps = [ "sdk:create_platform_sdk" ] |
| Ben Konyi | 1960d21 | 2020-05-12 23:37:19 | [diff] [blame] | 136 | } |
| 137 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 138 | group("dart2js") { |
| asiva | 8b2b6b2 | 2024-11-08 04:36:23 | [diff] [blame] | 139 | 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 Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 148 | } |
| 149 | |
| Joshua Litt | fd39eab | 2022-10-05 11:55:22 | [diff] [blame] | 150 | group("dart2wasm_platform") { |
| Aske Simon Christensen | 6c76042 | 2022-05-10 10:06:06 | [diff] [blame] | 151 | deps = [ |
| 152 | ":runtime_precompiled", |
| Joshua Litt | 9e37c2b | 2023-07-18 19:34:38 | [diff] [blame] | 153 | "utils/dart2wasm:compile_dart2wasm_js_compatibility_platform", |
| Aske Simon Christensen | 6c76042 | 2022-05-10 10:06:06 | [diff] [blame] | 154 | "utils/dart2wasm:compile_dart2wasm_platform", |
| Aske Simon Christensen | 6c76042 | 2022-05-10 10:06:06 | [diff] [blame] | 155 | "utils/dart2wasm:dart2wasm_snapshot", |
| Joshua Litt | fd39eab | 2022-10-05 11:55:22 | [diff] [blame] | 156 | ] |
| Joshua Litt | 1ed2a07 | 2022-10-26 17:04:17 | [diff] [blame] | 157 | 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 Macnak | 8d60495 | 2022-10-10 19:14:58 | [diff] [blame] | 163 | } |
| Joshua Litt | fd39eab | 2022-10-05 11:55:22 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | group("dart2wasm") { |
| 167 | deps = [ |
| 168 | ":dart2wasm_platform", |
| Ömer Sinan Ağacan | affc339 | 2022-09-23 09:41:22 | [diff] [blame] | 169 | "utils/dart2wasm:test_wasm_modules", |
| Aske Simon Christensen | 6c76042 | 2022-05-10 10:06:06 | [diff] [blame] | 170 | ] |
| 171 | } |
| 172 | |
| Martin Kustermann | 0fdeaee | 2022-11-18 10:58:54 | [diff] [blame] | 173 | group("dart2wasm_benchmark") { |
| 174 | deps = [ |
| 175 | ":dart2wasm_platform", |
| 176 | "third_party/binaryen:wasm-opt", |
| 177 | ] |
| 178 | } |
| 179 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 180 | group("dartanalyzer") { |
| asiva | e33d023 | 2020-03-10 21:56:11 | [diff] [blame] | 181 | deps = [ "utils/dartanalyzer" ] |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 182 | } |
| 183 | |
| Nicholas Shahan | f4e9496 | 2023-07-25 00:19:52 | [diff] [blame] | 184 | group("ddc") { |
| asiva | 8b2b6b2 | 2024-11-08 04:36:23 | [diff] [blame] | 185 | 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 Shahan | f4e9496 | 2023-07-25 00:19:52 | [diff] [blame] | 198 | } |
| 199 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 200 | group("analysis_server") { |
| asiva | e33d023 | 2020-03-10 21:56:11 | [diff] [blame] | 201 | deps = [ "utils/analysis_server" ] |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 202 | } |
| 203 | |
| Vyacheslav Egorov | a4dd314 | 2024-05-24 09:40:39 | [diff] [blame] | 204 | group("tools") { |
| 205 | deps = [ |
| 206 | "utils:compile_platform.exe", |
| 207 | "utils:gen_kernel.exe", |
| 208 | ] |
| 209 | } |
| 210 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 211 | # 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. |
| 214 | group("dart2js_bot") { |
| Nicholas Shahan | c1ce43f | 2025-01-08 23:10:26 | [diff] [blame] | 215 | deps = [ |
| 216 | ":create_sdk", |
| Mayank Patke | 0c55c7e | 2025-02-26 23:57:55 | [diff] [blame] | 217 | "utils/compiler:compile_dart2js_platform", |
| Nicholas Shahan | c1ce43f | 2025-01-08 23:10:26 | [diff] [blame] | 218 | ] |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 219 | } |
| 220 | |
| Liam Appelbe | 089d6fc | 2020-07-10 18:10:05 | [diff] [blame] | 221 | if (is_fuchsia) { |
| Zijie He | 690b2ef | 2023-11-13 21:24:08 | [diff] [blame] | 222 | import("third_party/fuchsia/gn-sdk/src/component.gni") |
| 223 | import("third_party/fuchsia/gn-sdk/src/package.gni") |
| Ryan Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 224 | import("utils/aot_snapshot.gni") |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 225 | import("utils/application_snapshot.gni") |
| 226 | |
| Ryan Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 227 | # TODO(b/399714829): Test packages should be created at test-time, not build-time. |
| 228 | |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 229 | # tests/ffi/**_test.dart except those with compile-time errors |
| 230 | test_sources = [ |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 231 | "tests/ffi/abi_specific_int_test.dart", |
| 232 | "tests/ffi/abi_test.dart", |
| 233 | "tests/ffi/address_of_array_generated_test.dart", |
| Daco Harkes | e65551b | 2024-08-28 10:40:21 | [diff] [blame] | 234 | "tests/ffi/address_of_cast_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 235 | "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 Goderbauer | c326065 | 2025-03-20 13:38:27 | [diff] [blame] | 240 | "tests/ffi/array_compound_elements_test.dart", |
| 241 | "tests/ffi/array_primitive_elements_generated_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 242 | "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 Durmus | bb483f3 | 2024-12-09 22:02:56 | [diff] [blame] | 276 | "tests/ffi/function_structs_by_value_generated_compounds_sizeof_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 277 | "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 Harkes | 965234c | 2024-08-06 07:50:49 | [diff] [blame] | 298 | "tests/ffi/inline_array_variable_length_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 299 | "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 Harkes | 6378a26 | 2024-08-23 07:03:15 | [diff] [blame] | 344 | "tests/ffi/regress_56412_2_test.dart", |
| 345 | "tests/ffi/regress_56412_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 346 | "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 Macnak | 3257d56 | 2025-02-19 18:46:03 | [diff] [blame] | 360 | "tests/ffi/vmspecific_callback_unwind_error_through_handle_test.dart", |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 361 | "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 Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 393 | aot_label = label + "_aot" |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 394 | |
| 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 Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 401 | aot_snapshot(aot_label) { |
| 402 | main_dart = test_source |
| 403 | output = "$target_gen_dir/$test_source.elf" |
| 404 | } |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 405 | |
| Ryan Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 406 | test_deps += [ |
| 407 | ":$aot_label", |
| 408 | ":$label", |
| 409 | ] |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 410 | test_resources += [ |
| 411 | { |
| 412 | path = rebase_path("$target_gen_dir/$test_source.dill") |
| 413 | dest = "data/$test_source" |
| 414 | }, |
| Ryan Macnak | 4ab313c | 2025-04-01 16:50:12 | [diff] [blame] | 415 | { |
| 416 | path = rebase_path("$target_gen_dir/$test_source.elf") |
| 417 | dest = "data/$test_source.elf" |
| 418 | }, |
| Ryan Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 419 | ] |
| 420 | } |
| Liam Appelbe | 089d6fc | 2020-07-10 18:10:05 | [diff] [blame] | 421 | |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 422 | test_binaries = [ |
| asiva | 97bc401 | 2025-07-10 06:08:28 | [diff] [blame] | 423 | "dart", |
| asiva | 8b2b6b2 | 2024-11-08 04:36:23 | [diff] [blame] | 424 | "dartaotruntime", |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 425 | "run_vm_tests", |
| 426 | ] |
| Liam Appelbe | 6fc75e6 | 2020-07-15 20:44:06 | [diff] [blame] | 427 | |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 428 | foreach(binary, test_binaries) { |
| 429 | fuchsia_component("${binary}_test_component") { |
| Daco Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 430 | testonly = true |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 431 | 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 Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 441 | resource_files = [ |
| 442 | ".dart_tool/package_config.json", |
| Daco Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 443 | "tools/addlatexhash.dart", |
| 444 | ] |
| Daco Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 445 | 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 Macnak | d42a4b7 | 2024-04-30 17:37:45 | [diff] [blame] | 462 | deps = test_deps |
| 463 | resources += test_resources |
| Daco Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 464 | } |
| 465 | } |
| 466 | |
| Ryan Macnak | 573fad4 | 2023-10-31 17:11:51 | [diff] [blame] | 467 | 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 Harkes | 550d580 | 2020-12-10 12:15:17 | [diff] [blame] | 480 | } |
| Liam Appelbe | 089d6fc | 2020-07-10 18:10:05 | [diff] [blame] | 481 | } |
| Ryan Macnak | 208b5d8 | 2025-05-21 21:25:28 | [diff] [blame] | 482 | |
| 483 | if (is_linux) { |
| 484 | group("debian_package") { |
| 485 | public_deps = [ "tools/debian_package" ] |
| 486 | } |
| 487 | } |