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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 'sources': [ | 146 'sources': [ |
147 'base/x/events_x_unittest.cc', | 147 'base/x/events_x_unittest.cc', |
148 ], | 148 ], |
149 }], | 149 }], |
150 ['OS != "mac"', { | 150 ['OS != "mac"', { |
151 'sources': [ | 151 'sources': [ |
152 'gfx/transform_unittest.cc', | 152 'gfx/transform_unittest.cc', |
153 'gfx/interpolated_transform_unittest.cc', | 153 'gfx/interpolated_transform_unittest.cc', |
154 ], | 154 ], |
155 }], | 155 }], |
| 156 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { |
| 157 'dependencies': [ |
| 158 '../testing/android/native_test.gyp:native_test_native_code', |
| 159 ], |
| 160 }], |
156 ['use_glib == 1', { | 161 ['use_glib == 1', { |
157 'dependencies': [ | 162 'dependencies': [ |
158 '../build/linux/system.gyp:pangocairo', | 163 '../build/linux/system.gyp:pangocairo', |
159 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', | 164 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck', |
160 'base/strings/ui_strings.gyp:ui_unittest_strings', | 165 'base/strings/ui_strings.gyp:ui_unittest_strings', |
161 ], | 166 ], |
162 'conditions': [ | 167 'conditions': [ |
163 ['linux_use_tcmalloc==1', { | 168 ['linux_use_tcmalloc==1', { |
164 'dependencies': [ | 169 'dependencies': [ |
165 '../base/allocator/allocator.gyp:allocator', | 170 '../base/allocator/allocator.gyp:allocator', |
(...skipping 26 matching lines...) Expand all Loading... |
192 ], | 197 ], |
193 }], | 198 }], |
194 ['use_aura==1 or toolkit_views==1', { | 199 ['use_aura==1 or toolkit_views==1', { |
195 'sources': [ | 200 'sources': [ |
196 'base/gestures/velocity_calculator_unittest.cc', | 201 'base/gestures/velocity_calculator_unittest.cc', |
197 ], | 202 ], |
198 }], | 203 }], |
199 ], | 204 ], |
200 }, | 205 }, |
201 ], | 206 ], |
| 207 'conditions': [ |
| 208 # Special target to wrap a <(gtest_target_type)==shared_library |
| 209 # ui_unittests into an android apk for execution. |
| 210 # See base.gyp for TODO(jrg)s about this strategy. |
| 211 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { |
| 212 'targets': [ |
| 213 { |
| 214 'target_name': 'ui_unittests_apk', |
| 215 'type': 'none', |
| 216 'dependencies': [ |
| 217 'ui_unittests', |
| 218 ], |
| 219 'actions': [ |
| 220 { |
| 221 # Generate apk files (including source and antfile) from |
| 222 # a template, and builds them. |
| 223 'action_name': 'generate_and_build', |
| 224 'inputs': [ |
| 225 '../testing/android/generate_native_test.py', |
| 226 '<(PRODUCT_DIR)/lib.target/libui_unittests.so', |
| 227 '<(PRODUCT_DIR)/chromium_base.jar', |
| 228 ], |
| 229 'outputs': [ |
| 230 '<(PRODUCT_DIR)/ChromeNativeTests_ui_unittests-debug.apk', |
| 231 ], |
| 232 'action': [ |
| 233 '../testing/android/generate_native_test.py', |
| 234 '--native_library', |
| 235 '<(PRODUCT_DIR)/lib.target/libui_unittests.so', |
| 236 # TODO(jrg): find a better way to specify jar |
| 237 # dependencies. Hard coding seems fragile. |
| 238 '--jar', |
| 239 '<(PRODUCT_DIR)/chromium_base.jar', |
| 240 '--output', |
| 241 '<(PRODUCT_DIR)/ui_unittests_apk', |
| 242 '--ant-args', |
| 243 '-DPRODUCT_DIR=<(PRODUCT_DIR)', |
| 244 '--ant-compile' |
| 245 ], |
| 246 }, |
| 247 ] |
| 248 }, |
| 249 ], |
| 250 }], |
| 251 ], |
202 } | 252 } |
OLD | NEW |