OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 'targets': [ | 6 'targets': [ |
7 { | 7 { |
8 'target_name': 'ui_test_support', | 8 'target_name': 'ui_test_support', |
9 'dependencies': [ | 9 'dependencies': [ |
10 '../base/base.gyp:base', | 10 '../base/base.gyp:base', |
(...skipping 11 matching lines...) Expand all Loading... |
22 'conditions': [ | 22 'conditions': [ |
23 ['OS=="mac"', { | 23 ['OS=="mac"', { |
24 'type': 'static_library', | 24 'type': 'static_library', |
25 }, { # OS != "mac" | 25 }, { # OS != "mac" |
26 'type': 'none', | 26 'type': 'none', |
27 }], | 27 }], |
28 ], | 28 ], |
29 }, | 29 }, |
30 { | 30 { |
31 'target_name': 'ui_unittests', | 31 'target_name': 'ui_unittests', |
32 'type': 'executable', | 32 'type': '<(gtest_target_type)', |
33 'includes': [ | 33 'includes': [ |
34 'base/ime/ime_unittests.gypi', | 34 'base/ime/ime_unittests.gypi', |
35 ], | 35 ], |
36 'dependencies': [ | 36 'dependencies': [ |
37 '../base/base.gyp:base', | 37 '../base/base.gyp:base', |
38 '../base/base.gyp:test_support_base', | 38 '../base/base.gyp:test_support_base', |
39 '../build/temp_gyp/googleurl.gyp:googleurl', | 39 '../build/temp_gyp/googleurl.gyp:googleurl', |
40 '../skia/skia.gyp:skia', | 40 '../skia/skia.gyp:skia', |
41 '../testing/gmock.gyp:gmock', | 41 '../testing/gmock.gyp:gmock', |
42 '../testing/gtest.gyp:gtest', | 42 '../testing/gtest.gyp:gtest', |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 'sources': [ | 147 'sources': [ |
148 'base/x/events_x_unittest.cc', | 148 'base/x/events_x_unittest.cc', |
149 ], | 149 ], |
150 }], | 150 }], |
151 ['OS != "mac"', { | 151 ['OS != "mac"', { |
152 'sources': [ | 152 'sources': [ |
153 'gfx/transform_unittest.cc', | 153 'gfx/transform_unittest.cc', |
154 'gfx/interpolated_transform_unittest.cc', | 154 'gfx/interpolated_transform_unittest.cc', |
155 ], | 155 ], |
156 }], | 156 }], |
| 157 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { |
| 158 'dependencies': [ |
| 159 '../testing/android/native_test.gyp:native_test_native_code', |
| 160 ], |
| 161 }], |
157 ['use_glib == 1', { | 162 ['use_glib == 1', { |
158 'dependencies': [ | 163 'dependencies': [ |
159 '../build/linux/system.gyp:pangocairo', | 164 '../build/linux/system.gyp:pangocairo', |
160 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', | 165 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
161 'base/strings/ui_strings.gyp:ui_unittest_strings', | 166 'base/strings/ui_strings.gyp:ui_unittest_strings', |
162 ], | 167 ], |
163 'conditions': [ | 168 'conditions': [ |
164 ['linux_use_tcmalloc==1', { | 169 ['linux_use_tcmalloc==1', { |
165 'dependencies': [ | 170 'dependencies': [ |
166 '../base/allocator/allocator.gyp:allocator', | 171 '../base/allocator/allocator.gyp:allocator', |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 ], | 204 ], |
200 }], | 205 }], |
201 ['use_aura==1 or toolkit_views==1', { | 206 ['use_aura==1 or toolkit_views==1', { |
202 'sources': [ | 207 'sources': [ |
203 'base/gestures/velocity_calculator_unittest.cc', | 208 'base/gestures/velocity_calculator_unittest.cc', |
204 ], | 209 ], |
205 }], | 210 }], |
206 ], | 211 ], |
207 }, | 212 }, |
208 ], | 213 ], |
| 214 'conditions': [ |
| 215 # Special target to wrap a <(gtest_target_type)==shared_library |
| 216 # ui_unittests into an android apk for execution. |
| 217 # See base.gyp for TODO(jrg)s about this strategy. |
| 218 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { |
| 219 'targets': [ |
| 220 { |
| 221 'target_name': 'ui_unittests_apk', |
| 222 'type': 'none', |
| 223 'dependencies': [ |
| 224 'ui_unittests', |
| 225 ], |
| 226 'actions': [ |
| 227 { |
| 228 # Generate apk files (including source and antfile) from |
| 229 # a template, and builds them. |
| 230 'action_name': 'generate_and_build', |
| 231 'inputs': [ |
| 232 '../testing/android/generate_native_test.py', |
| 233 '<(PRODUCT_DIR)/lib.target/libui_unittests.so', |
| 234 '<(PRODUCT_DIR)/chromium_base.jar', |
| 235 ], |
| 236 'outputs': [ |
| 237 '<(PRODUCT_DIR)/ChromeNativeTests_ui_unittests-debug.apk', |
| 238 ], |
| 239 'action': [ |
| 240 '../testing/android/generate_native_test.py', |
| 241 '--native_library', |
| 242 '<(PRODUCT_DIR)/lib.target/libui_unittests.so', |
| 243 # TODO(jrg): find a better way to specify jar |
| 244 # dependencies. Hard coding seems fragile. |
| 245 '--jar', |
| 246 '<(PRODUCT_DIR)/chromium_base.jar', |
| 247 '--output', |
| 248 '<(PRODUCT_DIR)/ui_unittests_apk', |
| 249 '--ant-args', |
| 250 '-DPRODUCT_DIR=<(PRODUCT_DIR)', |
| 251 '--ant-compile' |
| 252 ], |
| 253 }, |
| 254 ] |
| 255 }, |
| 256 ], |
| 257 }], |
| 258 ], |
209 } | 259 } |
OLD | NEW |