diff options
author | agrieve <agrieve@chromium.org> | 2015-12-01 08:36:19 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-01 16:37:49 +0000 |
commit | 97176368ff8be424d349132778d9c27624a1232d (patch) | |
tree | f8fd18b17a2ed85b2a221052f8614a31b9b618cb | |
parent | 0d94fda8c494d7a6c27d065d782f42e99d834f46 (diff) | |
download | chromium_src-97176368ff8be424d349132778d9c27624a1232d.zip chromium_src-97176368ff8be424d349132778d9c27624a1232d.tar.gz chromium_src-97176368ff8be424d349132778d9c27624a1232d.tar.bz2 |
GN: Merge apk_deps and deps in test() template
apk_deps has been causing some unneccesary confusion.
BUG=558193
R=tfarina@chromium.org,brettw@chromium.org
Review URL: https://codereview.chromium.org/1465923002
Cr-Commit-Position: refs/heads/master@{#362432}
-rw-r--r-- | base/BUILD.gn | 2 | ||||
-rw-r--r-- | chrome/test/BUILD.gn | 8 | ||||
-rw-r--r-- | components/BUILD.gn | 19 | ||||
-rw-r--r-- | components/html_viewer/BUILD.gn | 2 | ||||
-rw-r--r-- | content/test/BUILD.gn | 18 | ||||
-rw-r--r-- | device/BUILD.gn | 6 | ||||
-rw-r--r-- | gpu/BUILD.gn | 2 | ||||
-rw-r--r-- | media/BUILD.gn | 4 | ||||
-rw-r--r-- | media/midi/BUILD.gn | 2 | ||||
-rw-r--r-- | net/BUILD.gn | 16 | ||||
-rw-r--r-- | remoting/BUILD.gn | 2 | ||||
-rw-r--r-- | testing/test.gni | 15 | ||||
-rw-r--r-- | third_party/WebKit/Source/platform/BUILD.gn | 2 | ||||
-rw-r--r-- | third_party/WebKit/Source/web/BUILD.gn | 2 | ||||
-rw-r--r-- | ui/android/BUILD.gn | 2 | ||||
-rw-r--r-- | ui/base/BUILD.gn | 2 | ||||
-rw-r--r-- | ui/gfx/BUILD.gn | 2 |
17 files changed, 46 insertions, 60 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn index 0841c6e..b7e300b 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1525,7 +1525,7 @@ test("base_unittests") { } if (is_android) { - apk_deps = [ + deps += [ ":base_java", ":base_java_unittest_support", ] diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 8ce7c9f..523198f 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn @@ -1645,14 +1645,14 @@ test("unit_tests") { chrome_tests_unit_gypi_values.chrome_unit_tests_offline_pages_sources, ".", "//chrome") + deps += [ + ":unit_tests_java", + "//v8:v8_external_startup_data_assets", + ] deps -= [ "//third_party/libaddressinput" ] android_manifest = "//chrome/test/android/unit_tests_apk/AndroidManifest.xml" - apk_deps = [ - ":unit_tests_java", - "//v8:v8_external_startup_data_assets", - ] isolate_file = "../unit_tests.isolate" # Some android targets still depend on --gc-sections to link. diff --git a/components/BUILD.gn b/components/BUILD.gn index c032af8..fa9fe7a 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn @@ -490,26 +490,23 @@ test("components_unittests") { deps += [ "//components/invalidation/impl", + "//components/invalidation/impl:java", "//components/safe_json", + "//components/safe_json/android:safe_json_java", "//components/signin/core/browser", + "//components/signin/core/browser/android:java", + "//components/variations/android:variations_java", + "//content/public/android:content_java", "//content/public/android:content_java", "//content/public/browser", "//net", + "//ui/android:ui_java", "//ui/base", "//ui/gfx", ] - apk_deps = [ - "//components/invalidation/impl:java", - "//components/safe_json/android:safe_json_java", - "//components/signin/core/browser/android:java", - "//components/variations/android:variations_java", - "//content/public/android:content_java", - "//ui/android:ui_java", - ] - if (enable_configuration_policy) { - apk_deps += [ "//components/policy/android:policy_java" ] + deps += [ "//components/policy/android:policy_java" ] } } @@ -702,7 +699,7 @@ test("components_browsertests") { isolate_file = "components_browsertests.isolate" android_manifest = "${target_gen_dir}/components_browsertests_manifest/AndroidManifest.xml" - apk_deps = [ + deps += [ ":components_browsertests_assets", ":components_browsertests_java", ":components_browsertests_manifest", diff --git a/components/html_viewer/BUILD.gn b/components/html_viewer/BUILD.gn index 4e41104..5f4a08a 100644 --- a/components/html_viewer/BUILD.gn +++ b/components/html_viewer/BUILD.gn @@ -328,7 +328,7 @@ test("html_viewer_unittests") { ] if (is_android) { - apk_deps = [ ":unittest_assets" ] + deps += [ ":unittest_assets" ] write_asset_list = true } diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 674f7cf..804da0b 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -441,17 +441,15 @@ test("content_browsertests") { "//content") sources -= [ "../browser/battery_status/battery_monitor_impl_browsertest.cc" ] - deps -= [ "//device/battery" ] deps += [ - "//content/shell:content_shell_lib", - "//content/shell/android:content_shell_jni_headers", - "//testing/android/native_test:native_test_support", - ] - apk_deps = [ ":content_browsertests_java", ":content_browsertests_manifest", + "//content/shell:content_shell_lib", "//content/shell/android:content_shell_assets", + "//content/shell/android:content_shell_jni_headers", + "//testing/android/native_test:native_test_support", ] + deps -= [ "//device/battery" ] android_manifest = "${target_gen_dir}/content_browsertests_manifest/AndroidManifest.xml" isolate_file = "//content/content_browsertests.isolate" @@ -708,7 +706,7 @@ test("content_unittests") { ] deps -= [ "//device/battery" ] - apk_deps = [ + deps += [ "//base:base_java_unittest_support", "//content/public/android:content_java", "//v8:v8_external_startup_data_assets", @@ -830,7 +828,7 @@ test("content_gl_tests") { ] if (is_android) { - apk_deps = [ + deps += [ "//content/public/test/android:content_java_test_support", "//content/shell/android:content_shell_assets", ] @@ -896,10 +894,8 @@ if (is_android) { deps += [ "//gpu:test_support", "//media/base/android", - "//testing/gmock", - ] - apk_deps = [ "//media/base/android:media_java", + "//testing/gmock", "//ui/android:ui_java", ] } diff --git a/device/BUILD.gn b/device/BUILD.gn index e4f56a5..5c53606 100644 --- a/device/BUILD.gn +++ b/device/BUILD.gn @@ -138,9 +138,11 @@ test("device_unittests") { if (is_android) { sources -= [ "battery/battery_status_service_unittest.cc" ] + deps += [ + ":bluetooth_test_java", + ":bluetooth_test_jni_headers", + ] deps -= [ "//device/battery" ] - deps += [ ":bluetooth_test_jni_headers" ] - apk_deps = [ ":bluetooth_test_java" ] } if (is_chromeos) { diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 167ff15..7193022 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -177,7 +177,7 @@ test("gl_tests") { if (is_android) { libs += [ "android" ] - apk_deps = [ "//ui/android:ui_java" ] + deps += [ "//ui/android:ui_java" ] } } diff --git a/media/BUILD.gn b/media/BUILD.gn index eb4c38f..f6b5209 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -691,13 +691,13 @@ test("media_unittests") { if (is_android) { isolate_file = "media_unittests.isolate" - deps += [ "//media/base/android:unittests" ] sources -= [ "filters/decrypting_audio_decoder_unittest.cc", "filters/decrypting_video_decoder_unittest.cc", ] - apk_deps = [ + deps += [ "//media/base/android:media_java", + "//media/base/android:unittests", "//ui/android:ui_java", ] } diff --git a/media/midi/BUILD.gn b/media/midi/BUILD.gn index 01a2e09..59a8e9c 100644 --- a/media/midi/BUILD.gn +++ b/media/midi/BUILD.gn @@ -179,7 +179,7 @@ test("midi_unittests") { ] if (is_android) { - apk_deps = [ ":midi_java" ] + deps += [ ":midi_java" ] isolate_file = "midi_unittests.isolate" } diff --git a/net/BUILD.gn b/net/BUILD.gn index 74d0c67..d41f31c 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn @@ -1600,12 +1600,17 @@ test("net_unittests") { } if (is_android) { - apk_deps = [ + deps += [ + ":net_test_jni_headers", "//base:base_java_unittest_support", "//net/android:net_java", - "//net/android:net_javatests", "//net/android:net_java_test_support", + "//net/android:net_javatests", "//net/android:net_unittests_apk_resources", + + # TODO(mmenke): This depends on test_support_base, which depends on + # icu. Figure out a way to remove that dependency. + "//testing/android/native_test:native_test_native_code", "//v8:v8_external_startup_data_assets", ] android_manifest = "//net/android/unittest_support/AndroidManifest.xml" @@ -1613,13 +1618,6 @@ test("net_unittests") { # See bug http://crbug.com/344533. "disk_cache/blockfile/index_table_v3_unittest.cc", ] - deps += [ - ":net_test_jni_headers", - - # TODO(mmenke): This depends on test_support_base, which depends on - # icu. Figure out a way to remove that dependency. - "//testing/android/native_test:native_test_native_code", - ] set_sources_assignment_filter([]) sources += [ "base/address_tracker_linux_unittest.cc" ] set_sources_assignment_filter(sources_assignment_filter) diff --git a/remoting/BUILD.gn b/remoting/BUILD.gn index 2aee690..815f8b6 100644 --- a/remoting/BUILD.gn +++ b/remoting/BUILD.gn @@ -157,7 +157,7 @@ if (!is_mac) { } if (is_android) { - apk_deps = [ "//net/android:net_java" ] + deps += [ "//net/android:net_java" ] } } diff --git a/testing/test.gni b/testing/test.gni index a280a1b..a150c24 100644 --- a/testing/test.gni +++ b/testing/test.gni @@ -28,6 +28,7 @@ template("test") { # Don't use "*" to forward all variables since some (like output_name # and isolate_file) apply only to the APK below. + deps = [] forward_variables_from(invoker, [ "all_dependent_configs", @@ -40,6 +41,7 @@ template("test") { "data_deps", "datadeps", "defines", + "deps", "include_dirs", "ldflags", "lib_dirs", @@ -53,36 +55,27 @@ template("test") { "visibility", ]) - deps = [] if (!defined(invoker.use_default_launcher) || invoker.use_default_launcher) { deps += [ "//testing/android/native_test:native_test_native_code" ] } - if (defined(invoker.deps)) { - deps += invoker.deps - } } unittest_apk(apk_name) { forward_variables_from(invoker, [ "android_manifest", + "deps", "use_default_launcher", "write_asset_list", ]) - unittests_dep = ":$library_name" apk_name = main_target_name if (defined(invoker.output_name)) { apk_name = invoker.output_name unittests_binary = "lib${apk_name}.so" } - deps = [ - ":$library_name", - ] - if (defined(invoker.apk_deps)) { - deps += invoker.apk_deps - } + deps += [ ":$library_name" ] if (defined(invoker.apk_asset_location)) { asset_location = invoker.apk_asset_location } diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn index 2bc8c08..c59f6534 100644 --- a/third_party/WebKit/Source/platform/BUILD.gn +++ b/third_party/WebKit/Source/platform/BUILD.gn @@ -363,7 +363,7 @@ test("heap_unittests") { "//third_party/WebKit/Source/wtf:test_support", ] if (is_android) { - apk_deps = [ + deps += [ "//base:base_java", "//content/shell/android:content_shell_assets", "//net/android:net_java", diff --git a/third_party/WebKit/Source/web/BUILD.gn b/third_party/WebKit/Source/web/BUILD.gn index b32d00f..14d51c1 100644 --- a/third_party/WebKit/Source/web/BUILD.gn +++ b/third_party/WebKit/Source/web/BUILD.gn @@ -140,7 +140,7 @@ test("webkit_unit_tests") { } if (is_android) { - apk_deps = [ + deps += [ "//base:base_java", "//content/shell/android:content_shell_assets", "//net/android:net_java", diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index 412f4d7..c4beefd 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn @@ -158,6 +158,7 @@ test("ui_android_unittests") { ] deps = [ ":android", + ":ui_java", "//base", "//base/test:test_support", "//cc", @@ -169,5 +170,4 @@ test("ui_android_unittests") { "//ui/gfx", "//ui/resources:ui_test_pak", ] - apk_deps = [ ":ui_java" ] } diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index a17bc11..a5d46e5 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -815,7 +815,7 @@ test("ui_base_unittests") { } if (is_android) { - apk_deps = [ + deps += [ "//chrome:resources", "//ui/android:ui_java", ] diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn index c70843d..d50f412 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn @@ -708,7 +708,7 @@ test("gfx_unittests") { } if (is_android) { - apk_deps = [ "//ui/android:ui_java" ] + deps += [ "//ui/android:ui_java" ] sources -= [ # Do not run display_change_notifier_unittest.cc on Android because it |