blob: a49696aeaa819b46da079c85dd09747ca9702127 [file] [log] [blame]
[email protected]cab208eb02012-10-18 22:15:231# 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
3# found in the LICENSE file.
4
5{
6 'variables': {
[email protected]06eaeb442012-10-24 18:01:017 'chromium_code': 1,
[email protected]cab208eb02012-10-18 22:15:238 },
9 'targets': [
10 {
[email protected]cab208eb02012-10-18 22:15:2311 'target_name': 'device_unittests',
12 'type': '<(gtest_target_type)',
13 'dependencies': [
[email protected]cab208eb02012-10-18 22:15:2314 '../base/base.gyp:test_support_base',
[email protected]7e77c0d2014-07-30 22:54:0615 '../mojo/mojo_base.gyp:mojo_environment_chromium',
[email protected]cab208eb02012-10-18 22:15:2316 '../testing/gmock.gyp:gmock',
17 '../testing/gtest.gyp:gtest',
blundell70fb547672015-01-19 17:18:3318 '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
19 '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
reillyg4e279522014-09-06 18:37:1520 '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
ppi2438a3e2014-10-28 21:55:1021 'battery/battery.gyp:device_battery',
22 'battery/battery.gyp:device_battery_mojo_bindings',
[email protected]e3a9ccfc2013-06-03 00:22:3023 'bluetooth/bluetooth.gyp:device_bluetooth',
24 'bluetooth/bluetooth.gyp:device_bluetooth_mocks',
gunsch67dbdf12015-06-23 17:09:0725 'core/core.gyp:device_core',
rockot0fa66a82015-06-11 17:25:4526 'devices_app/devices_app.gyp:devices_app_lib',
[email protected]b763b842013-12-03 10:37:1527 'nfc/nfc.gyp:device_nfc',
[email protected]e3a9ccfc2013-06-03 00:22:3028 'usb/usb.gyp:device_usb',
reillygcf9be262015-05-14 16:06:0629 'usb/usb.gyp:device_usb_mocks',
[email protected]125724f2014-01-31 20:13:2330 'hid/hid.gyp:device_hid',
[email protected]9a1be232014-07-09 13:04:2631 'serial/serial.gyp:device_serial',
[email protected]b50715c2014-07-21 07:18:3232 'serial/serial.gyp:device_serial_test_util',
[email protected]cab208eb02012-10-18 22:15:2333 ],
34 'sources': [
ppi2438a3e2014-10-28 21:55:1035 'battery/battery_status_manager_linux_unittest.cc',
36 'battery/battery_status_manager_win_unittest.cc',
37 'battery/battery_status_service_unittest.cc',
[email protected]1073598a2013-03-04 19:27:4338 'bluetooth/bluetooth_adapter_mac_unittest.mm',
yoichio500c6db2015-09-29 07:39:2239 'bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc',
tfarinacdc7e5d2015-02-23 09:52:2440 'bluetooth/bluetooth_adapter_unittest.cc',
[email protected]cae636d2012-11-14 00:47:4841 'bluetooth/bluetooth_adapter_win_unittest.cc',
yoichio500c6db2015-09-29 07:39:2242 'bluetooth/bluetooth_advertisement_chromeos_unittest.cc',
ortuno945c90d2015-09-01 01:47:0843 'bluetooth/bluetooth_advertisement_unittest.cc',
yoichio500c6db2015-09-29 07:39:2244 'bluetooth/bluetooth_audio_sink_chromeos_unittest.cc',
45 'bluetooth/bluetooth_chromeos_unittest.cc',
[email protected]db00ff82014-05-17 05:49:4646 'bluetooth/bluetooth_device_unittest.cc',
[email protected]edcaf14a2013-02-25 17:46:3647 'bluetooth/bluetooth_device_win_unittest.cc',
jpawlowskif54d01542015-04-13 22:24:4348 'bluetooth/bluetooth_discovery_filter_unittest.cc',
scheibdd941ba42015-10-27 05:40:1249 'bluetooth/bluetooth_gatt_characteristic_unittest.cc',
yoichio500c6db2015-09-29 07:39:2250 'bluetooth/bluetooth_gatt_chromeos_unittest.cc',
scheib33aa3f42015-10-16 01:23:1551 'bluetooth/bluetooth_gatt_service_unittest.cc',
[email protected]2ede7a22014-06-28 00:51:4952 'bluetooth/bluetooth_low_energy_win_unittest.cc',
[email protected]47c72642013-01-20 01:09:5153 'bluetooth/bluetooth_service_record_win_unittest.cc',
yoichio500c6db2015-09-29 07:39:2254 'bluetooth/bluetooth_socket_chromeos_unittest.cc',
[email protected]0216e792013-01-16 00:28:1755 'bluetooth/bluetooth_task_manager_win_unittest.cc',
[email protected]8148ad42014-04-04 04:10:3856 'bluetooth/bluetooth_uuid_unittest.cc',
scheib545d7fd2015-06-30 22:26:5857 'bluetooth/test/bluetooth_test.cc',
58 'bluetooth/test/bluetooth_test.h',
59 'bluetooth/test/bluetooth_test_android.cc',
60 'bluetooth/test/bluetooth_test_android.h',
krstnmnlsn56d371032015-07-21 20:18:0761 'bluetooth/test/bluetooth_test_mac.h',
62 'bluetooth/test/bluetooth_test_mac.mm',
scheib42e6b49d2015-04-29 21:46:5763 'bluetooth/test/test_bluetooth_adapter_observer.cc',
64 'bluetooth/test/test_bluetooth_adapter_observer.h',
rockot0fa66a82015-06-11 17:25:4565 'devices_app/usb/device_impl_unittest.cc',
66 'devices_app/usb/device_manager_impl_unittest.cc',
reillyg83746f462015-09-29 21:30:0067 'devices_app/usb/fake_permission_provider.cc',
68 'devices_app/usb/fake_permission_provider.h',
[email protected]125724f2014-01-31 20:13:2369 'hid/hid_connection_unittest.cc',
reillygf4dc9d142014-08-29 05:52:4870 'hid/hid_device_filter_unittest.cc',
[email protected]fe7b3002014-04-25 00:16:4071 'hid/hid_report_descriptor_unittest.cc',
[email protected]eedae132014-04-12 22:02:3772 'hid/input_service_linux_unittest.cc',
reillyg37cde9952015-01-13 03:07:1173 'hid/test_report_descriptors.cc',
74 'hid/test_report_descriptors.h',
tfarinacdc7e5d2015-02-23 09:52:2475 'nfc/nfc_chromeos_unittest.cc',
76 'nfc/nfc_ndef_record_unittest.cc',
[email protected]4e99a932014-08-19 06:14:0277 'serial/data_sink_unittest.cc',
[email protected]f5b07922014-08-11 12:18:5178 'serial/data_source_unittest.cc',
[email protected]b50715c2014-07-21 07:18:3279 'serial/serial_connection_unittest.cc',
juncai923ede72015-07-30 22:58:3080 "serial/serial_io_handler_posix_unittest.cc",
[email protected]9a1be232014-07-09 13:04:2681 'serial/serial_service_unittest.cc',
82 'test/run_all_unittests.cc',
reillygbadbc5412015-08-28 23:08:1083 'test/test_device_client.cc',
84 'test/test_device_client.h',
tfarinacdc7e5d2015-02-23 09:52:2485 'test/usb_test_gadget_impl.cc',
86 'usb/usb_context_unittest.cc',
reillyg86549e52015-08-15 03:00:4387 'usb/usb_descriptors_unittest.cc',
tfarinacdc7e5d2015-02-23 09:52:2488 'usb/usb_device_filter_unittest.cc',
89 'usb/usb_device_handle_unittest.cc',
90 'usb/usb_ids_unittest.cc',
91 'usb/usb_service_unittest.cc',
reillygd80d79b22015-08-05 20:27:1492 'usb/webusb_descriptors_unittest.cc',
[email protected]cab208eb02012-10-18 22:15:2393 ],
94 'conditions': [
[email protected]06eaeb442012-10-24 18:01:0195 ['chromeos==1', {
[email protected]cab208eb02012-10-18 22:15:2396 'dependencies': [
yoichio500c6db2015-09-29 07:39:2297 '../build/linux/system.gyp:dbus',
[email protected]cab208eb02012-10-18 22:15:2398 '../chromeos/chromeos.gyp:chromeos_test_support',
[email protected]896619e2013-04-18 04:41:4299 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
yoichio500c6db2015-09-29 07:39:22100 '../dbus/dbus.gyp:dbus',
ppi2438a3e2014-10-28 21:55:10101 ],
102 'sources!': [
103 'battery/battery_status_manager_linux_unittest.cc',
104 ],
[email protected]cab208eb02012-10-18 22:15:23105 }],
scheibb63d1ea2015-03-30 21:57:35106 ['OS=="android"', {
107 'dependencies!': [
108 '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
leon.han4e5d8102015-09-02 07:12:00109 'battery/battery.gyp:device_battery',
rockot0fa66a82015-06-11 17:25:45110 'devices_app/devices_app.gyp:devices_app_lib',
scheibb63d1ea2015-03-30 21:57:35111 'usb/usb.gyp:device_usb',
reillygcf9be262015-05-14 16:06:06112 'usb/usb.gyp:device_usb_mocks',
scheibb63d1ea2015-03-30 21:57:35113 'serial/serial.gyp:device_serial',
114 'serial/serial.gyp:device_serial_test_util',
115 'hid/hid.gyp:device_hid',
116 ],
117 'dependencies': [
118 '../testing/android/native_test.gyp:native_test_native_code',
scheib56010cc2015-06-25 01:29:47119 'device_bluetooth_test_java',
120 'device_bluetooth_test_jni_headers',
scheibb63d1ea2015-03-30 21:57:35121 ],
122 'sources/': [
123 ['exclude', '(^|/)hid'],
124 ['exclude', '(^|/)serial'],
125 ['exclude', '(^|/)usb'],
126 ],
leon.han4e5d8102015-09-02 07:12:00127 'sources!': [
128 'battery/battery_status_service_unittest.cc',
129 ],
scheibb63d1ea2015-03-30 21:57:35130 }],
[email protected]7d06ba372013-03-26 06:06:26131 ['OS=="mac"', {
krstnmnlsn332a71cf2015-07-17 18:59:58132 'dependencies': [
133 '../third_party/ocmock/ocmock.gyp:ocmock',
134 ],
[email protected]7d06ba372013-03-26 06:06:26135 'link_settings': {
136 'libraries': [
137 '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
138 ],
139 },
krstnmnlsn332a71cf2015-07-17 18:59:58140 'xcode_settings' : {
141 'OTHER_LDFLAGS' : [
142 '-ObjC',
143 ],
144 },
[email protected]7d06ba372013-03-26 06:06:26145 }],
[email protected]df941492013-01-25 01:38:27146 ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
147 'conditions': [
[email protected]2fa89ef2014-05-07 18:45:59148 ['use_allocator!="none"', {
[email protected]df941492013-01-25 01:38:27149 'dependencies': [
150 '../base/allocator/allocator.gyp:allocator',
151 ],
152 }],
153 ],
154 }],
agoodeb48f1882015-03-09 19:34:24155 ['use_udev==1', {
156 'dependencies': [
157 'udev_linux/udev.gyp:udev_linux',
158 ],
159 'sources': [
160 'udev_linux/udev_unittest.cc',
161 ],
162 }],
[email protected]7bcb65a62014-06-05 16:46:40163 ['OS=="linux" and use_udev==0', {
164 # Udev is the only Linux implementation. If we're compiling without
165 # Udev, disable these unittests.
[email protected]10d8d022014-06-05 19:37:01166 'dependencies!': [
167 'hid/hid.gyp:device_hid',
[email protected]1d655fe92014-08-18 22:14:13168 'serial/serial.gyp:device_serial',
169 'serial/serial.gyp:device_serial_test_util',
[email protected]10d8d022014-06-05 19:37:01170 ],
171 'sources/': [
[email protected]1d655fe92014-08-18 22:14:13172 ['exclude', '^serial/'],
[email protected]10d8d022014-06-05 19:37:01173 ['exclude', '^hid/'],
[email protected]7bcb65a62014-06-05 16:46:40174 ],
175 }],
ppi2438a3e2014-10-28 21:55:10176 ['use_dbus==0', {
177 'sources!': [
178 'battery/battery_status_manager_linux_unittest.cc',
179 ],
180 }],
[email protected]cab208eb02012-10-18 22:15:23181 ],
182 },
183 ],
scheibb63d1ea2015-03-30 21:57:35184 'conditions': [
185 ['OS=="android"', {
186 'targets': [
187 {
188 'target_name': 'device_unittests_apk',
189 'type': 'none',
190 'dependencies': [
191 'device_unittests',
192 ],
193 'variables': {
194 'test_suite_name': 'device_unittests',
195 },
196 'includes': [ '../build/apk_test.gypi' ],
197 },
scheib56010cc2015-06-25 01:29:47198 {
199 'target_name': 'device_bluetooth_test_jni_headers',
200 'type': 'none',
201 'sources': [
scheib545d7fd2015-06-30 22:26:58202 'bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java',
scheib56010cc2015-06-25 01:29:47203 ],
204 'variables': {
205 'jni_gen_package': 'device_bluetooth',
206 },
207 'includes': [ '../build/jni_generator.gypi' ],
208 },
209 {
210 'target_name': 'device_bluetooth_test_java',
211 'type': 'none',
212 'dependencies': [
213 'bluetooth/bluetooth.gyp:device_bluetooth_java',
214 ],
215 'variables': {
216 'java_in_dir': 'bluetooth/test/android/java',
217 },
218 'includes': [ '../build/java.gypi' ],
219 },
scheibb63d1ea2015-03-30 21:57:35220 ],
stip269b92f2015-10-01 07:53:55221 'conditions': [
222 ['test_isolation_mode != "noop"', {
223 'targets': [
224 {
225 'target_name': 'device_unittests_apk_run',
226 'type': 'none',
227 'dependencies': [
228 'device_unittests_apk',
229 ],
230 'includes': [
231 '../build/isolate.gypi',
232 ],
233 'sources': [
234 'device_unittests_apk.isolate',
235 ],
236 },
237 ],
238 }],
239 ],
scheibb63d1ea2015-03-30 21:57:35240 }],
reillygdffcf172015-06-30 23:13:35241 ['test_isolation_mode != "noop"', {
242 'targets': [
243 {
244 'target_name': 'device_unittests_run',
245 'type': 'none',
246 'dependencies': [
247 'device_unittests',
248 ],
249 'includes': [
250 '../build/isolate.gypi',
251 ],
252 'sources': [
253 'device_unittests.isolate',
254 ]
255 }
256 ]
257 }]
scheibb63d1ea2015-03-30 21:57:35258 ],
[email protected]cab208eb02012-10-18 22:15:23259}