OLD | NEW |
1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 2 # for details. All rights reserved. Use of this source code is governed by a |
3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 # This target will be built if no target is specified when invoking ninja. | 5 # This target will be built if no target is specified when invoking ninja. |
6 group("default") { | 6 group("default") { |
7 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { | 7 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { |
8 # Fuchsia has run_vm_tests marked testonly. | 8 # Fuchsia has run_vm_tests marked testonly. |
9 testonly = true | 9 testonly = true |
10 } | 10 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 deps = [ | 160 deps = [ |
161 ":create_sdk", | 161 ":create_sdk", |
162 ] | 162 ] |
163 } | 163 } |
164 | 164 |
165 group("samples") { | 165 group("samples") { |
166 deps = [ | 166 deps = [ |
167 "runtime/bin:sample_extension", | 167 "runtime/bin:sample_extension", |
168 ] | 168 ] |
169 } | 169 } |
| 170 |
| 171 |
| 172 # The rules below build a qemu Fuchsia OS image that includes the Dart tree |
| 173 # under /system/test/dart. Building this image is gated by the GN argument |
| 174 # 'dart_build_fuchsia_test_image' because building the image is slow. |
| 175 if (defined(is_fuchsia) && (is_fuchsia)) { |
| 176 declare_args() { |
| 177 dart_build_fuchsia_test_image = false |
| 178 } |
| 179 |
| 180 if (dart_build_fuchsia_test_image) { |
| 181 action("generate_dart_test_manifest") { |
| 182 testonly = true |
| 183 |
| 184 deps = [ |
| 185 "//packages/gn:mkbootfs", |
| 186 ] |
| 187 |
| 188 output_prefix = "$target_gen_dir/dart_test_tree" |
| 189 outputs = [ |
| 190 "$output_prefix.manifest", |
| 191 ] |
| 192 |
| 193 mode = "release" |
| 194 if (is_debug) { |
| 195 mode = "debug" |
| 196 } |
| 197 |
| 198 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") |
| 199 user_manifest = "$mkbootfs_gen/user.bootfs.manifest" |
| 200 |
| 201 script = "tools/gen_fuchsia_test_manifest.py" |
| 202 args = [ |
| 203 "-m", |
| 204 mode, |
| 205 "-u", |
| 206 rebase_path(user_manifest), |
| 207 "-o", |
| 208 rebase_path(output_prefix), |
| 209 ] |
| 210 } |
| 211 |
| 212 action("generate_dart_test_image") { |
| 213 testonly = true |
| 214 deps = [ |
| 215 "runtime/bin:dart", |
| 216 "runtime/bin:run_vm_tests", |
| 217 "runtime/bin:process_test", |
| 218 ":generate_dart_test_manifest", |
| 219 ] |
| 220 |
| 221 input = "$target_gen_dir/dart_test_tree.manifest" |
| 222 inputs = [ |
| 223 input, |
| 224 ] |
| 225 |
| 226 output = "$root_out_dir/dart_test_tree.bin" |
| 227 outputs = [ |
| 228 output, |
| 229 ] |
| 230 |
| 231 script = "//packages/gn/make_bootfs.py" |
| 232 args = [ |
| 233 "--manifest", |
| 234 rebase_path(input), |
| 235 "--output-file", |
| 236 rebase_path(output), |
| 237 "--build-id-map", |
| 238 rebase_path("$target_gen_dir/build_id_map"), |
| 239 "--compress", |
| 240 ] |
| 241 } |
| 242 } |
| 243 } |
OLD | NEW |