Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: BUILD.gn

Issue 2897123002: [Fuchsia] Fix test image creation (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 (is_fuchsia || is_fuchsia_host) { 7 if (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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 group("samples") { 115 group("samples") {
116 deps = [ 116 deps = [
117 "runtime/bin:sample_extension", 117 "runtime/bin:sample_extension",
118 ] 118 ]
119 } 119 }
120 120
121 # The rules below build a qemu Fuchsia OS image that includes the Dart tree 121 # The rules below build a qemu Fuchsia OS image that includes the Dart tree
122 # under /system/test/dart. Building this image is gated by the GN argument 122 # under /system/test/dart. Building this image is gated by the GN argument
123 # 'dart_build_fuchsia_test_image' because building the image is slow. 123 # 'dart_build_fuchsia_test_image' because building the image is slow.
rmacnak 2017/05/23 20:59:04 Remove dead flag.
zra 2017/05/24 05:19:22 Done in https://codereview.chromium.org/2902083002
124 if (is_fuchsia) { 124 if (is_fuchsia) {
125 declare_args() { 125 declare_args() {
126 dart_build_fuchsia_test_image = false 126 dart_build_fuchsia_test_image = false
127 } 127 }
128 128
129 action("generate_dart_test_manifest") { 129 action("generate_dart_test_manifest") {
130 testonly = true 130 testonly = true
131 131
132 deps = [ 132 deps = [
133 "//packages/gn:mkbootfs", 133 "//packages/gn:mkbootfs",
134 ] 134 ]
135 135
136 output_prefix = "$target_gen_dir/dart_test_tree" 136 output_prefix = "$target_gen_dir/dart_test_tree"
137 outputs = [ 137 outputs = [
138 "$output_prefix.manifest", 138 "$output_prefix.manifest",
139 ] 139 ]
140 140
141 mode = "release" 141 mode = "release"
142 if (is_debug) { 142 if (is_debug) {
143 mode = "debug" 143 mode = "debug"
144 } 144 }
145 145
146 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") 146 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
147 user_manifest = "$mkbootfs_gen/user.bootfs.manifest" 147 system_manifest = "$mkbootfs_gen/system.bootfs.manifest"
148 148
149 script = "tools/gen_fuchsia_test_manifest.py" 149 script = "tools/gen_fuchsia_test_manifest.py"
150 args = [ 150 args = [
151 "-m", 151 "-m",
152 mode, 152 mode,
153 "-u", 153 "-u",
154 rebase_path(user_manifest), 154 rebase_path(system_manifest),
155 "-o", 155 "-o",
156 rebase_path(output_prefix), 156 rebase_path(output_prefix),
157 ] 157 ]
158 } 158 }
159 159
160 action("generate_dart_test_image") { 160 action("generate_dart_test_image") {
161 testonly = true 161 testonly = true
162 deps = [ 162 deps = [
163 ":generate_dart_test_manifest", 163 ":generate_dart_test_manifest",
164 "runtime/bin:dart", 164 "runtime/bin:dart",
165 "runtime/bin:process_test", 165 "runtime/bin:process_test",
166 "runtime/bin:run_vm_tests", 166 "runtime/bin:run_vm_tests",
167 ] 167 ]
168 168
169 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir")
170 boot_manifest = "$mkbootfs_gen/boot.bootfs.manifest"
171
169 # Compute path to magenta bootdata.bin 172 # Compute path to magenta bootdata.bin
170 if (current_cpu == "arm64") { 173 if (current_cpu == "arm64") {
171 magenta_bootdata = 174 magenta_bootdata =
172 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin" 175 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin"
173 } else if (current_cpu == "x64") { 176 } else if (current_cpu == "x64") {
174 magenta_bootdata = 177 magenta_bootdata =
175 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin" 178 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin"
176 } else { 179 } else {
177 assert(false, "unable to determine path to magenta's bootdata.bin") 180 assert(false, "unable to determine path to magenta's bootdata.bin")
178 } 181 }
179 182
180 input = "$target_gen_dir/dart_test_tree.manifest" 183 input = "$target_gen_dir/dart_test_tree.manifest"
181 inputs = [ 184 inputs = [
182 magenta_bootdata, 185 magenta_bootdata,
183 input, 186 input,
184 ] 187 ]
185 188
186 output = "$root_out_dir/dart_test_tree.bin" 189 output = "$root_out_dir/dart_test_tree.bin"
187 outputs = [ 190 outputs = [
188 output, 191 output,
189 ] 192 ]
190 193
191 script = "//packages/gn/make_bootfs.py" 194 script = "//packages/gn/make_bootfs.py"
192 args = [ 195 args = [
193 "--manifest", 196 "--boot-manifest",
197 rebase_path(boot_manifest),
198 "--system-manifest",
194 rebase_path(input), 199 rebase_path(input),
195 "--output-file", 200 "--output-file",
196 rebase_path(output), 201 rebase_path(output),
197 "--build-id-map", 202 "--build-id-map",
198 rebase_path("$target_gen_dir/build_id_map"), 203 rebase_path("$target_gen_dir/build_id_map"),
199 "--pre-binaries", 204 "--pre-binaries",
200 rebase_path(magenta_bootdata), 205 rebase_path(magenta_bootdata),
201 ] 206 ]
202 } 207 }
203 } 208 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698