OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
6 import("//mojo/public/mojo.gni") | 6 import("//mojo/public/mojo.gni") |
7 import("//mojo/public/tools/bindings/mojom.gni") | 7 import("//mojo/public/tools/bindings/mojom.gni") |
8 | 8 |
9 # We don't support building in the component build since mojo apps are | 9 # We don't support building in the component build since mojo apps are |
10 # inherently components. | 10 # inherently components. |
11 assert(!is_component_build) | 11 assert(!is_component_build) |
12 | 12 |
13 group("shell") { | 13 group("shell") { |
14 testonly = true | 14 testonly = true |
15 | 15 |
16 deps = [ | 16 deps = [ |
17 ":mojo_shell", | 17 ":mojo_shell", |
18 ":tests", | 18 ":tests", |
19 ] | 19 ] |
20 | 20 |
21 if (!is_win) { | 21 if (!is_win) { |
22 deps += [ ":mojo_launcher" ] | 22 deps += [ ":mojo_launcher" ] |
23 } | 23 } |
24 | 24 |
25 if (is_android) { | 25 if (is_android) { |
26 deps += [ ":mojo_shell_apk" ] | 26 deps += [ |
| 27 ":mojo_shell_apk", |
| 28 ":mojo_shell_tests_apk", |
| 29 ] |
27 } | 30 } |
28 } | 31 } |
29 | 32 |
30 group("tests") { | 33 group("tests") { |
31 testonly = true | 34 testonly = true |
32 deps = [ | 35 deps = [ |
33 ":external_application_unittests", | 36 ":external_application_unittests", |
34 ":mojo_shell_tests", | 37 ":mojo_shell_tests", |
35 ] | 38 ] |
36 } | 39 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 # separate source_set so we can leave checking on for the rest of the target. | 226 # separate source_set so we can leave checking on for the rest of the target. |
224 check_includes = false | 227 check_includes = false |
225 } | 228 } |
226 | 229 |
227 if (is_android) { | 230 if (is_android) { |
228 generate_jni("jni_headers") { | 231 generate_jni("jni_headers") { |
229 sources = [ | 232 sources = [ |
230 "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java", | 233 "android/apk/src/org/chromium/mojo/shell/AndroidHandler.java", |
231 "android/apk/src/org/chromium/mojo/shell/Bootstrap.java", | 234 "android/apk/src/org/chromium/mojo/shell/Bootstrap.java", |
232 "android/apk/src/org/chromium/mojo/shell/MojoMain.java", | 235 "android/apk/src/org/chromium/mojo/shell/MojoMain.java", |
| 236 "android/tests/src/org/chromium/mojo/shell/ShellTestBase.java", |
233 ] | 237 ] |
234 jni_package = "mojo/shell" | 238 jni_package = "mojo/shell" |
235 } | 239 } |
236 | 240 |
237 android_library("bootstrap_java") { | 241 android_library("bootstrap_java") { |
238 java_files = [ "android/apk/src/org/chromium/mojo/shell/Bootstrap.java" ] | 242 java_files = [ "android/apk/src/org/chromium/mojo/shell/Bootstrap.java" ] |
239 | 243 |
240 deps = [ | 244 deps = [ |
241 "//base:base_java", | 245 "//base:base_java", |
242 ] | 246 ] |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 "//base:base_java", | 284 "//base:base_java", |
281 ] | 285 ] |
282 } | 286 } |
283 | 287 |
284 android_resources("resources") { | 288 android_resources("resources") { |
285 resource_dirs = [ "android/apk/res" ] | 289 resource_dirs = [ "android/apk/res" ] |
286 custom_package = "org.chromium.mojo.shell" | 290 custom_package = "org.chromium.mojo.shell" |
287 } | 291 } |
288 | 292 |
289 mojo_shell_assets_dir = "$root_build_dir/mojo_shell_assets" | 293 mojo_shell_assets_dir = "$root_build_dir/mojo_shell_assets" |
| 294 mojo_shell_test_assets_dir = "$root_build_dir/mojo_shell_test_assets" |
290 | 295 |
291 copy_ex("copy_mojo_shell_assets") { | 296 copy_ex("copy_mojo_shell_assets") { |
292 clear_dir = true | 297 clear_dir = true |
293 dest = mojo_shell_assets_dir | 298 dest = mojo_shell_assets_dir |
294 sources = [ | 299 sources = [ |
295 "$root_out_dir/lib.stripped/libbootstrap.so", | 300 "$root_out_dir/lib.stripped/libbootstrap.so", |
296 "$root_out_dir/network_service.mojo", | 301 "$root_out_dir/network_service.mojo", |
297 "$root_out_dir/obj/shell/bootstrap_java.dex.jar", | 302 "$root_out_dir/obj/shell/bootstrap_java.dex.jar", |
298 ] | 303 ] |
299 } | 304 } |
300 | 305 |
301 copy("copy_mojo_shell") { | 306 copy("copy_mojo_shell") { |
302 sources = [ | 307 sources = [ |
303 "$root_out_dir/exe.stripped/mojo_shell", | 308 "$root_out_dir/exe.stripped/mojo_shell", |
304 ] | 309 ] |
305 outputs = [ | 310 outputs = [ |
306 "$root_out_dir/lib.stripped/libmojo_shell.so", | 311 "$root_out_dir/lib.stripped/libmojo_shell.so", |
307 ] | 312 ] |
308 } | 313 } |
309 | 314 |
| 315 copy_ex("copy_mojo_shell_test_assets") { |
| 316 clear_dir = true |
| 317 dest = mojo_shell_test_assets_dir |
| 318 sources = [ |
| 319 "$root_out_dir/test_app.mojo", |
| 320 "$root_out_dir/test_request_tracker_app.mojo", |
| 321 ] |
| 322 } |
| 323 |
310 android_apk("mojo_shell_apk") { | 324 android_apk("mojo_shell_apk") { |
311 apk_name = "MojoShell" | 325 apk_name = "MojoShell" |
312 | 326 |
313 android_manifest = "android/apk/AndroidManifest.xml" | 327 android_manifest = "android/apk/AndroidManifest.xml" |
314 | 328 |
315 native_libs = [ "libmojo_shell.so" ] | 329 native_libs = [ "libmojo_shell.so" ] |
316 | 330 |
317 asset_location = mojo_shell_assets_dir | 331 asset_location = mojo_shell_assets_dir |
318 | 332 |
319 deps = [ | 333 deps = [ |
320 ":copy_mojo_shell", | 334 ":copy_mojo_shell", |
321 ":copy_mojo_shell_assets", | 335 ":copy_mojo_shell_assets", |
322 ":java", | 336 ":java", |
323 ":resources", | 337 ":resources", |
324 "//services/native_viewport:native_viewport_java", | 338 "//services/native_viewport:native_viewport_java", |
325 ] | 339 ] |
326 } | 340 } |
| 341 |
| 342 android_library("mojo_shell_tests_java") { |
| 343 java_files = |
| 344 [ "android/tests/src/org/chromium/mojo/shell/ShellTestBase.java" ] |
| 345 |
| 346 deps = [ |
| 347 ":java", |
| 348 "//base:base_java", |
| 349 ] |
| 350 } |
| 351 |
| 352 unittest_apk("mojo_shell_tests_apk") { |
| 353 unittests_dep = ":mojo_shell_tests" |
| 354 |
| 355 asset_location = mojo_shell_test_assets_dir |
| 356 |
| 357 deps = [ |
| 358 unittests_dep, |
| 359 ":copy_mojo_shell_test_assets", |
| 360 ":mojo_shell_tests_java", |
| 361 ] |
| 362 } |
327 } | 363 } |
328 | 364 |
329 mojom("app_child_process_bindings") { | 365 mojom("app_child_process_bindings") { |
330 sources = [ | 366 sources = [ |
331 "app_child_process.mojom", | 367 "app_child_process.mojom", |
332 ] | 368 ] |
333 } | 369 } |
334 | 370 |
335 mojom("external_application_registrar_bindings") { | 371 mojom("external_application_registrar_bindings") { |
336 sources = [ | 372 sources = [ |
(...skipping 30 matching lines...) Expand all Loading... |
367 # GYP version: mojo/mojo.gyp:mojo_shell_tests | 403 # GYP version: mojo/mojo.gyp:mojo_shell_tests |
368 test("mojo_shell_tests") { | 404 test("mojo_shell_tests") { |
369 sources = [ | 405 sources = [ |
370 "child_process_host_unittest.cc", | 406 "child_process_host_unittest.cc", |
371 "command_line_util_unittest.cc", | 407 "command_line_util_unittest.cc", |
372 "data_pipe_peek_unittest.cc", | 408 "data_pipe_peek_unittest.cc", |
373 "dynamic_application_loader_unittest.cc", | 409 "dynamic_application_loader_unittest.cc", |
374 "in_process_dynamic_service_runner_unittest.cc", | 410 "in_process_dynamic_service_runner_unittest.cc", |
375 "mojo_url_resolver_unittest.cc", | 411 "mojo_url_resolver_unittest.cc", |
376 "shell_test_base.cc", | 412 "shell_test_base.cc", |
| 413 "shell_test_base_android.cc", |
377 "shell_test_base.h", | 414 "shell_test_base.h", |
378 "shell_test_base_unittest.cc", | 415 "shell_test_base_unittest.cc", |
379 "shell_test_main.cc", | 416 "shell_test_main.cc", |
380 ] | 417 ] |
381 | 418 |
382 deps = [ | 419 deps = [ |
383 ":in_process_dynamic_service_runner", | 420 ":in_process_dynamic_service_runner", |
384 ":lib", | 421 ":lib", |
385 "//base", | 422 "//base", |
386 "//base:i18n", | 423 "//base:i18n", |
(...skipping 11 matching lines...) Expand all Loading... |
398 | 435 |
399 datadeps = [ | 436 datadeps = [ |
400 "//services/test_service:test_app", | 437 "//services/test_service:test_app", |
401 "//services/test_service:test_request_tracker_app", | 438 "//services/test_service:test_request_tracker_app", |
402 ] | 439 ] |
403 | 440 |
404 if (is_android) { | 441 if (is_android) { |
405 sources += [ "android/background_application_loader_unittest.cc" ] | 442 sources += [ "android/background_application_loader_unittest.cc" ] |
406 | 443 |
407 deps += [ | 444 deps += [ |
408 # TODO(GYP): | 445 ":jni_headers", |
409 #'../testing/android/native_test.gyp:native_test_native_code', | 446 "//testing/android:native_test_native_code", |
410 ] | 447 ] |
411 } | 448 } |
412 } | 449 } |
413 | 450 |
414 # GYP version: mojo/mojo.gyp:mojo_shell_test_support | 451 # GYP version: mojo/mojo.gyp:mojo_shell_test_support |
415 source_set("test_support") { | 452 source_set("test_support") { |
416 sources = [ | 453 sources = [ |
417 "shell_test_helper.cc", | 454 "shell_test_helper.cc", |
418 "shell_test_helper.h", | 455 "shell_test_helper.h", |
419 ] | 456 ] |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 | 496 |
460 deps -= [ | 497 deps -= [ |
461 ":lib", | 498 ":lib", |
462 ":external_application_registrar_connection", | 499 ":external_application_registrar_connection", |
463 ":external_application_registrar_bindings", | 500 ":external_application_registrar_bindings", |
464 "//shell/domain_socket", | 501 "//shell/domain_socket", |
465 "//shell/domain_socket:tests", | 502 "//shell/domain_socket:tests", |
466 ] | 503 ] |
467 } | 504 } |
468 } | 505 } |
OLD | NEW |