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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } else { | 179 } else { |
180 deps = [] | 180 deps = [] |
181 } | 181 } |
182 deps += [ | 182 deps += [ |
183 # All shared libraries must have the sanitizer deps to properly link in | 183 # All shared libraries must have the sanitizer deps to properly link in |
184 # asan mode (this target will be empty in other cases). | 184 # asan mode (this target will be empty in other cases). |
185 "//build/config/sanitizers:deps", | 185 "//build/config/sanitizers:deps", |
186 ] | 186 ] |
187 } | 187 } |
188 } else { | 188 } else { |
| 189 main_target_name = target_name |
| 190 |
189 executable(target_name) { | 191 executable(target_name) { |
190 forward_variables_from(invoker, "*") | 192 forward_variables_from(invoker, "*") |
191 | 193 |
192 testonly = true | 194 testonly = true |
193 | 195 |
194 if (!defined(invoker.deps)) { | 196 if (!defined(invoker.deps)) { |
195 deps = [] | 197 deps = [] |
196 } | 198 } |
197 deps += [ | 199 deps += [ |
198 # All shared libraries must have the sanitizer deps to properly link in | 200 # All shared libraries must have the sanitizer deps to properly link in |
199 # asan mode (this target will be empty in other cases). | 201 # asan mode (this target will be empty in other cases). |
200 "//build/config/sanitizers:deps", | 202 "//build/config/sanitizers:deps", |
201 | 203 |
202 # Give tests the default manifest on Windows (a no-op elsewhere). | 204 # Give tests the default manifest on Windows (a no-op elsewhere). |
203 "//build/win:default_exe_manifest", | 205 "//build/win:default_exe_manifest", |
204 ] | 206 ] |
205 } | 207 } |
| 208 |
| 209 # TODO(GYP): Delete this after we've converted everything to GN. |
| 210 # The _run targets exist only for compatibility with GYP. |
| 211 group("${target_name}_run") { |
| 212 testonly = true |
| 213 deps = [ |
| 214 ":$main_target_name", |
| 215 ] |
| 216 } |
206 } | 217 } |
207 } | 218 } |
OLD | NEW |