| OLD | NEW |
| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 group("${target_name}_incremental") { | 116 group("${target_name}_incremental") { |
| 117 testonly = true | 117 testonly = true |
| 118 datadeps = [ | 118 datadeps = [ |
| 119 ":$incremental_test_runner_script_name", | 119 ":$incremental_test_runner_script_name", |
| 120 ] | 120 ] |
| 121 deps = [ | 121 deps = [ |
| 122 ":${apk_name}_incremental", | 122 ":${apk_name}_incremental", |
| 123 ] | 123 ] |
| 124 } | 124 } |
| 125 } else if (is_ios) { | 125 } else if (is_ios) { |
| 126 if (is_ios) { | 126 import("//build/config/ios/rules.gni") |
| 127 import("//build/config/ios/rules.gni") | 127 ios_test_app(target_name) { |
| 128 } | 128 forward_variables_from(invoker, "*") |
| 129 | 129 |
| 130 ios_app(target_name) { | 130 if (!defined(invoker.deps)) { |
| 131 # TODO(GYP): Make this configurable and only provide a default | |
| 132 # that can be overridden. | |
| 133 info_plist = "//testing/gtest_ios/unittest-Info.plist" | |
| 134 app_name = target_name | |
| 135 entitlements_path = "//testing/gtest_ios" | |
| 136 code_signing_identity = "" | |
| 137 testonly = true | |
| 138 | |
| 139 # See above call. | |
| 140 set_sources_assignment_filter([]) | |
| 141 | |
| 142 forward_variables_from(invoker, | |
| 143 [ | |
| 144 "all_dependent_configs", | |
| 145 "allow_circular_includes_from", | |
| 146 "cflags", | |
| 147 "cflags_c", | |
| 148 "cflags_cc", | |
| 149 "cflags_objc", | |
| 150 "cflags_objcc", | |
| 151 "check_includes", | |
| 152 "configs", | |
| 153 "data", | |
| 154 "data_deps", | |
| 155 "defines", | |
| 156 "include_dirs", | |
| 157 "ldflags", | |
| 158 "libs", | |
| 159 "output_extension", | |
| 160 "output_name", | |
| 161 "public", | |
| 162 "public_configs", | |
| 163 "public_deps", | |
| 164 "sources", | |
| 165 "visibility", | |
| 166 ]) | |
| 167 | |
| 168 if (defined(invoker.deps)) { | |
| 169 deps = invoker.deps | |
| 170 } else { | |
| 171 deps = [] | 131 deps = [] |
| 172 } | 132 } |
| 133 |
| 173 deps += [ | 134 deps += [ |
| 174 # All shared libraries must have the sanitizer deps to properly link in | 135 # All shared libraries must have the sanitizer deps to properly link in |
| 175 # asan mode (this target will be empty in other cases). | 136 # asan mode (this target will be empty in other cases). |
| 176 "//build/config/sanitizers:deps", | 137 "//build/config/sanitizers:deps", |
| 177 ] | 138 ] |
| 178 } | 139 } |
| 179 } else { | 140 } else { |
| 180 executable(target_name) { | 141 executable(target_name) { |
| 181 forward_variables_from(invoker, "*") | 142 forward_variables_from(invoker, "*") |
| 182 | 143 |
| 183 testonly = true | 144 testonly = true |
| 184 | 145 |
| 185 if (!defined(invoker.deps)) { | 146 if (!defined(invoker.deps)) { |
| 186 deps = [] | 147 deps = [] |
| 187 } | 148 } |
| 188 deps += [ | 149 deps += [ |
| 189 # All shared libraries must have the sanitizer deps to properly link in | 150 # All shared libraries must have the sanitizer deps to properly link in |
| 190 # asan mode (this target will be empty in other cases). | 151 # asan mode (this target will be empty in other cases). |
| 191 "//build/config/sanitizers:deps", | 152 "//build/config/sanitizers:deps", |
| 192 | 153 |
| 193 # Give tests the default manifest on Windows (a no-op elsewhere). | 154 # Give tests the default manifest on Windows (a no-op elsewhere). |
| 194 "//build/win:default_exe_manifest", | 155 "//build/win:default_exe_manifest", |
| 195 ] | 156 ] |
| 196 } | 157 } |
| 197 } | 158 } |
| 198 } | 159 } |
| OLD | NEW |