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

Side by Side Diff: testing/test.gni

Issue 1465923002: GN: Merge apk_deps and deps in test() template (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased on formatting change Created 5 years, 1 month 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 # ============================================================================== 5 # ==============================================================================
6 # TEST SETUP 6 # TEST SETUP
7 # ============================================================================== 7 # ==============================================================================
8 8
9 # Define a test as an executable (or apk on Android) with the "testonly" flag 9 # Define a test as an executable (or apk on Android) with the "testonly" flag
10 # set. 10 # set.
(...skipping 10 matching lines...) Expand all
21 # Configs will always be defined since we set_defaults for a component 21 # Configs will always be defined since we set_defaults for a component
22 # in the main config. We want to use those rather than whatever came with 22 # in the main config. We want to use those rather than whatever came with
23 # the nested shared/static library inside the component. 23 # the nested shared/static library inside the component.
24 configs = [] # Prevent list overwriting warning. 24 configs = [] # Prevent list overwriting warning.
25 configs = invoker.configs 25 configs = invoker.configs
26 26
27 testonly = true 27 testonly = true
28 28
29 # Don't use "*" to forward all variables since some (like output_name 29 # Don't use "*" to forward all variables since some (like output_name
30 # and isolate_file) apply only to the APK below. 30 # and isolate_file) apply only to the APK below.
31 deps = []
31 forward_variables_from(invoker, 32 forward_variables_from(invoker,
32 [ 33 [
33 "all_dependent_configs", 34 "all_dependent_configs",
34 "allow_circular_includes_from", 35 "allow_circular_includes_from",
35 "cflags", 36 "cflags",
36 "cflags_c", 37 "cflags_c",
37 "cflags_cc", 38 "cflags_cc",
38 "check_includes", 39 "check_includes",
39 "data", 40 "data",
40 "data_deps", 41 "data_deps",
41 "datadeps", 42 "datadeps",
42 "defines", 43 "defines",
44 "deps",
43 "include_dirs", 45 "include_dirs",
44 "ldflags", 46 "ldflags",
45 "lib_dirs", 47 "lib_dirs",
46 "libs", 48 "libs",
47 "output_extension", 49 "output_extension",
48 "output_name", 50 "output_name",
49 "public", 51 "public",
50 "public_configs", 52 "public_configs",
51 "public_deps", 53 "public_deps",
52 "sources", 54 "sources",
53 "visibility", 55 "visibility",
54 ]) 56 ])
55 57
56 deps = []
57 if (!defined(invoker.use_default_launcher) || 58 if (!defined(invoker.use_default_launcher) ||
58 invoker.use_default_launcher) { 59 invoker.use_default_launcher) {
59 deps += [ "//testing/android/native_test:native_test_native_code" ] 60 deps += [ "//testing/android/native_test:native_test_native_code" ]
60 } 61 }
61 if (defined(invoker.deps)) {
62 deps += invoker.deps
63 }
64 } 62 }
65 63
66 unittest_apk(apk_name) { 64 unittest_apk(apk_name) {
65 forward_variables_from(invoker, [ "deps" ])
67 unittests_dep = ":$library_name" 66 unittests_dep = ":$library_name"
68 apk_name = main_target_name 67 apk_name = main_target_name
69 if (defined(invoker.output_name)) { 68 if (defined(invoker.output_name)) {
70 apk_name = invoker.output_name 69 apk_name = invoker.output_name
71 unittests_binary = "lib${apk_name}.so" 70 unittests_binary = "lib${apk_name}.so"
72 } 71 }
73 deps = [ 72 deps += [ ":$library_name" ]
74 ":$library_name",
75 ]
76 if (defined(invoker.apk_deps)) {
77 deps += invoker.apk_deps
78 }
79 if (defined(invoker.apk_asset_location)) { 73 if (defined(invoker.apk_asset_location)) {
80 asset_location = invoker.apk_asset_location 74 asset_location = invoker.apk_asset_location
81 } 75 }
82 if (defined(invoker.android_manifest)) { 76 if (defined(invoker.android_manifest)) {
83 android_manifest = invoker.android_manifest 77 android_manifest = invoker.android_manifest
84 } 78 }
85 if (defined(invoker.use_default_launcher)) { 79 if (defined(invoker.use_default_launcher)) {
86 use_default_launcher = invoker.use_default_launcher 80 use_default_launcher = invoker.use_default_launcher
87 } 81 }
88 } 82 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 # All shared libraries must have the sanitizer deps to properly link in 191 # All shared libraries must have the sanitizer deps to properly link in
198 # asan mode (this target will be empty in other cases). 192 # asan mode (this target will be empty in other cases).
199 "//build/config/sanitizers:deps", 193 "//build/config/sanitizers:deps",
200 194
201 # Give tests the default manifest on Windows (a no-op elsewhere). 195 # Give tests the default manifest on Windows (a no-op elsewhere).
202 "//build/win:default_exe_manifest", 196 "//build/win:default_exe_manifest",
203 ] 197 ]
204 } 198 }
205 } 199 }
206 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698