[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 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 |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | { |
| 6 | 'variables': { |
[email protected] | 06eaeb44 | 2012-10-24 18:01:01 | [diff] [blame] | 7 | 'chromium_code': 1, |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 8 | }, |
| 9 | 'targets': [ |
| 10 | { |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 11 | 'target_name': 'device_unittests', |
| 12 | 'type': '<(gtest_target_type)', |
| 13 | 'dependencies': [ |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 14 | '../base/base.gyp:test_support_base', |
reillyg | 64c8f4f | 2016-02-10 23:29:20 | [diff] [blame] | 15 | '../mojo/mojo_base.gyp:mojo_url_type_converters', |
rockot | c637caf9b | 2016-02-10 09:57:08 | [diff] [blame] | 16 | '../mojo/mojo_edk.gyp:mojo_system_impl', |
| 17 | '../mojo/mojo_public.gyp:mojo_cpp_bindings', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 18 | '../testing/gmock.gyp:gmock', |
| 19 | '../testing/gtest.gyp:gtest', |
reillyg | 4e27952 | 2014-09-06 18:37:15 | [diff] [blame] | 20 | '../tools/usb_gadget/usb_gadget.gyp:usb_gadget', |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 21 | 'battery/battery.gyp:device_battery', |
| 22 | 'battery/battery.gyp:device_battery_mojo_bindings', |
[email protected] | e3a9ccfc | 2013-06-03 00:22:30 | [diff] [blame] | 23 | 'bluetooth/bluetooth.gyp:device_bluetooth', |
| 24 | 'bluetooth/bluetooth.gyp:device_bluetooth_mocks', |
gunsch | 67dbdf1 | 2015-06-23 17:09:07 | [diff] [blame] | 25 | 'core/core.gyp:device_core', |
reillyg | bcc08e21 | 2015-11-24 19:57:01 | [diff] [blame] | 26 | 'core/core.gyp:device_core_mocks', |
[email protected] | b763b84 | 2013-12-03 10:37:15 | [diff] [blame] | 27 | 'nfc/nfc.gyp:device_nfc', |
[email protected] | e3a9ccfc | 2013-06-03 00:22:30 | [diff] [blame] | 28 | 'usb/usb.gyp:device_usb', |
reillyg | cf9be26 | 2015-05-14 16:06:06 | [diff] [blame] | 29 | 'usb/usb.gyp:device_usb_mocks', |
reillyg | 64c8f4f | 2016-02-10 23:29:20 | [diff] [blame] | 30 | 'usb/usb.gyp:device_usb_mojo_bindings', |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 31 | 'hid/hid.gyp:device_hid', |
reillyg | bcc08e21 | 2015-11-24 19:57:01 | [diff] [blame] | 32 | 'hid/hid.gyp:device_hid_mocks', |
[email protected] | 9a1be23 | 2014-07-09 13:04:26 | [diff] [blame] | 33 | 'serial/serial.gyp:device_serial', |
[email protected] | b50715c | 2014-07-21 07:18:32 | [diff] [blame] | 34 | 'serial/serial.gyp:device_serial_test_util', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 35 | ], |
| 36 | 'sources': [ |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 37 | 'battery/battery_status_manager_linux_unittest.cc', |
| 38 | 'battery/battery_status_manager_win_unittest.cc', |
| 39 | 'battery/battery_status_service_unittest.cc', |
[email protected] | 1073598a | 2013-03-04 19:27:43 | [diff] [blame] | 40 | 'bluetooth/bluetooth_adapter_mac_unittest.mm', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 41 | 'bluetooth/bluetooth_adapter_unittest.cc', |
[email protected] | cae636d | 2012-11-14 00:47:48 | [diff] [blame] | 42 | 'bluetooth/bluetooth_adapter_win_unittest.cc', |
ortuno | 945c90d | 2015-09-01 01:47:08 | [diff] [blame] | 43 | 'bluetooth/bluetooth_advertisement_unittest.cc', |
[email protected] | db00ff8 | 2014-05-17 05:49:46 | [diff] [blame] | 44 | 'bluetooth/bluetooth_device_unittest.cc', |
[email protected] | edcaf14a | 2013-02-25 17:46:36 | [diff] [blame] | 45 | 'bluetooth/bluetooth_device_win_unittest.cc', |
jpawlowski | f54d0154 | 2015-04-13 22:24:43 | [diff] [blame] | 46 | 'bluetooth/bluetooth_discovery_filter_unittest.cc', |
scheib | dd941ba4 | 2015-10-27 05:40:12 | [diff] [blame] | 47 | 'bluetooth/bluetooth_gatt_characteristic_unittest.cc', |
scheib | 81a0ff26 | 2016-01-13 00:58:30 | [diff] [blame] | 48 | 'bluetooth/bluetooth_gatt_descriptor_unittest.cc', |
scheib | 33aa3f4 | 2015-10-16 01:23:15 | [diff] [blame] | 49 | 'bluetooth/bluetooth_gatt_service_unittest.cc', |
[email protected] | 2ede7a2 | 2014-06-28 00:51:49 | [diff] [blame] | 50 | 'bluetooth/bluetooth_low_energy_win_unittest.cc', |
[email protected] | 47c7264 | 2013-01-20 01:09:51 | [diff] [blame] | 51 | 'bluetooth/bluetooth_service_record_win_unittest.cc', |
[email protected] | 0216e79 | 2013-01-16 00:28:17 | [diff] [blame] | 52 | 'bluetooth/bluetooth_task_manager_win_unittest.cc', |
[email protected] | 8148ad4 | 2014-04-04 04:10:38 | [diff] [blame] | 53 | 'bluetooth/bluetooth_uuid_unittest.cc', |
scheib | 545d7fd | 2015-06-30 22:26:58 | [diff] [blame] | 54 | 'bluetooth/test/bluetooth_test.cc', |
| 55 | 'bluetooth/test/bluetooth_test.h', |
| 56 | 'bluetooth/test/bluetooth_test_android.cc', |
| 57 | 'bluetooth/test/bluetooth_test_android.h', |
krstnmnlsn | 56d37103 | 2015-07-21 20:18:07 | [diff] [blame] | 58 | 'bluetooth/test/bluetooth_test_mac.h', |
| 59 | 'bluetooth/test/bluetooth_test_mac.mm', |
gogerald | 512935cc | 2016-01-27 01:11:18 | [diff] [blame] | 60 | 'bluetooth/test/bluetooth_test_win.h', |
| 61 | 'bluetooth/test/bluetooth_test_win.cc', |
jlebel | a58fd75 | 2016-03-14 10:33:28 | [diff] [blame] | 62 | 'bluetooth/test/mock_bluetooth_cbperipheral_mac.mm', |
| 63 | 'bluetooth/test/mock_bluetooth_cbperipheral_mac.h', |
| 64 | 'bluetooth/test/mock_bluetooth_central_manager_mac.mm', |
| 65 | 'bluetooth/test/mock_bluetooth_central_manager_mac.h', |
scheib | 42e6b49d | 2015-04-29 21:46:57 | [diff] [blame] | 66 | 'bluetooth/test/test_bluetooth_adapter_observer.cc', |
| 67 | 'bluetooth/test/test_bluetooth_adapter_observer.h', |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 68 | 'hid/hid_connection_unittest.cc', |
reillyg | f4dc9d14 | 2014-08-29 05:52:48 | [diff] [blame] | 69 | 'hid/hid_device_filter_unittest.cc', |
[email protected] | fe7b300 | 2014-04-25 00:16:40 | [diff] [blame] | 70 | 'hid/hid_report_descriptor_unittest.cc', |
[email protected] | eedae13 | 2014-04-12 22:02:37 | [diff] [blame] | 71 | 'hid/input_service_linux_unittest.cc', |
reillyg | 37cde995 | 2015-01-13 03:07:11 | [diff] [blame] | 72 | 'hid/test_report_descriptors.cc', |
| 73 | 'hid/test_report_descriptors.h', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 74 | 'nfc/nfc_chromeos_unittest.cc', |
| 75 | 'nfc/nfc_ndef_record_unittest.cc', |
[email protected] | 4e99a93 | 2014-08-19 06:14:02 | [diff] [blame] | 76 | 'serial/data_sink_unittest.cc', |
[email protected] | f5b0792 | 2014-08-11 12:18:51 | [diff] [blame] | 77 | 'serial/data_source_unittest.cc', |
[email protected] | b50715c | 2014-07-21 07:18:32 | [diff] [blame] | 78 | 'serial/serial_connection_unittest.cc', |
juncai | 923ede7 | 2015-07-30 22:58:30 | [diff] [blame] | 79 | "serial/serial_io_handler_posix_unittest.cc", |
[email protected] | 9a1be23 | 2014-07-09 13:04:26 | [diff] [blame] | 80 | 'serial/serial_service_unittest.cc', |
| 81 | 'test/run_all_unittests.cc', |
reillyg | badbc541 | 2015-08-28 23:08:10 | [diff] [blame] | 82 | 'test/test_device_client.cc', |
| 83 | 'test/test_device_client.h', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 84 | 'test/usb_test_gadget_impl.cc', |
reillyg | 64c8f4f | 2016-02-10 23:29:20 | [diff] [blame] | 85 | 'usb/mojo/device_impl_unittest.cc', |
| 86 | 'usb/mojo/device_manager_impl_unittest.cc', |
| 87 | 'usb/mojo/fake_permission_provider.cc', |
| 88 | 'usb/mojo/fake_permission_provider.h', |
reillyg | 86549e5 | 2015-08-15 03:00:43 | [diff] [blame] | 89 | 'usb/usb_descriptors_unittest.cc', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 90 | 'usb/usb_device_filter_unittest.cc', |
| 91 | 'usb/usb_device_handle_unittest.cc', |
| 92 | 'usb/usb_ids_unittest.cc', |
| 93 | 'usb/usb_service_unittest.cc', |
reillyg | d80d79b2 | 2015-08-05 20:27:14 | [diff] [blame] | 94 | 'usb/webusb_descriptors_unittest.cc', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 95 | ], |
| 96 | 'conditions': [ |
[email protected] | 06eaeb44 | 2012-10-24 18:01:01 | [diff] [blame] | 97 | ['chromeos==1', { |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 98 | 'dependencies': [ |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 99 | '../chromeos/chromeos.gyp:chromeos_test_support', |
[email protected] | 896619e | 2013-04-18 04:41:42 | [diff] [blame] | 100 | '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 101 | ], |
| 102 | 'sources!': [ |
| 103 | 'battery/battery_status_manager_linux_unittest.cc', |
| 104 | ], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 105 | }], |
dnicoara | 59acb302 | 2015-12-17 18:13:16 | [diff] [blame] | 106 | ['(chromeos==1 or OS=="linux") and use_dbus==1', { |
rkc | 4107704 | 2015-11-06 07:20:58 | [diff] [blame] | 107 | 'dependencies': [ |
| 108 | '../build/linux/system.gyp:dbus', |
| 109 | '../dbus/dbus.gyp:dbus', |
| 110 | ], |
| 111 | 'sources': [ |
| 112 | 'bluetooth/bluetooth_adapter_profile_bluez_unittest.cc', |
| 113 | 'bluetooth/bluetooth_advertisement_bluez_unittest.cc', |
| 114 | 'bluetooth/bluetooth_audio_sink_bluez_unittest.cc', |
| 115 | 'bluetooth/bluetooth_bluez_unittest.cc', |
| 116 | 'bluetooth/bluetooth_gatt_bluez_unittest.cc', |
| 117 | 'bluetooth/bluetooth_socket_bluez_unittest.cc', |
| 118 | ], |
| 119 | }], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 120 | ['OS=="android"', { |
| 121 | 'dependencies!': [ |
leon.han | 4e5d810 | 2015-09-02 07:12:00 | [diff] [blame] | 122 | 'battery/battery.gyp:device_battery', |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 123 | 'serial/serial.gyp:device_serial', |
| 124 | 'serial/serial.gyp:device_serial_test_util', |
| 125 | 'hid/hid.gyp:device_hid', |
| 126 | ], |
| 127 | 'dependencies': [ |
| 128 | '../testing/android/native_test.gyp:native_test_native_code', |
scheib | 56010cc | 2015-06-25 01:29:47 | [diff] [blame] | 129 | 'device_bluetooth_test_java', |
| 130 | 'device_bluetooth_test_jni_headers', |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 131 | ], |
| 132 | 'sources/': [ |
| 133 | ['exclude', '(^|/)hid'], |
| 134 | ['exclude', '(^|/)serial'], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 135 | ], |
leon.han | 4e5d810 | 2015-09-02 07:12:00 | [diff] [blame] | 136 | 'sources!': [ |
| 137 | 'battery/battery_status_service_unittest.cc', |
reillyg | cf1af63 | 2015-11-18 16:42:58 | [diff] [blame] | 138 | 'usb/usb_context_unittest.cc', |
leon.han | 4e5d810 | 2015-09-02 07:12:00 | [diff] [blame] | 139 | ], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 140 | }], |
[email protected] | 7d06ba37 | 2013-03-26 06:06:26 | [diff] [blame] | 141 | ['OS=="mac"', { |
krstnmnlsn | 332a71cf | 2015-07-17 18:59:58 | [diff] [blame] | 142 | 'dependencies': [ |
| 143 | '../third_party/ocmock/ocmock.gyp:ocmock', |
| 144 | ], |
[email protected] | 7d06ba37 | 2013-03-26 06:06:26 | [diff] [blame] | 145 | 'link_settings': { |
| 146 | 'libraries': [ |
| 147 | '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework', |
| 148 | ], |
| 149 | }, |
krstnmnlsn | 332a71cf | 2015-07-17 18:59:58 | [diff] [blame] | 150 | 'xcode_settings' : { |
| 151 | 'OTHER_LDFLAGS' : [ |
| 152 | '-ObjC', |
| 153 | ], |
| 154 | }, |
[email protected] | 7d06ba37 | 2013-03-26 06:06:26 | [diff] [blame] | 155 | }], |
agoode | b48f188 | 2015-03-09 19:34:24 | [diff] [blame] | 156 | ['use_udev==1', { |
| 157 | 'dependencies': [ |
| 158 | 'udev_linux/udev.gyp:udev_linux', |
| 159 | ], |
| 160 | 'sources': [ |
| 161 | 'udev_linux/udev_unittest.cc', |
| 162 | ], |
| 163 | }], |
[email protected] | 7bcb65a6 | 2014-06-05 16:46:40 | [diff] [blame] | 164 | ['OS=="linux" and use_udev==0', { |
| 165 | # Udev is the only Linux implementation. If we're compiling without |
| 166 | # Udev, disable these unittests. |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 167 | 'dependencies!': [ |
| 168 | 'hid/hid.gyp:device_hid', |
[email protected] | 1d655fe9 | 2014-08-18 22:14:13 | [diff] [blame] | 169 | 'serial/serial.gyp:device_serial', |
| 170 | 'serial/serial.gyp:device_serial_test_util', |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 171 | ], |
| 172 | 'sources/': [ |
[email protected] | 1d655fe9 | 2014-08-18 22:14:13 | [diff] [blame] | 173 | ['exclude', '^serial/'], |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 174 | ['exclude', '^hid/'], |
[email protected] | 7bcb65a6 | 2014-06-05 16:46:40 | [diff] [blame] | 175 | ], |
| 176 | }], |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 177 | ['use_dbus==0', { |
| 178 | 'sources!': [ |
| 179 | 'battery/battery_status_manager_linux_unittest.cc', |
| 180 | ], |
| 181 | }], |
gogerald | cab3123 | 2016-02-03 21:20:33 | [diff] [blame] | 182 | ['OS=="win"', { |
| 183 | 'sources': [ |
gogerald | b8c706a | 2016-02-05 01:07:37 | [diff] [blame] | 184 | 'bluetooth/bluetooth_classic_win_fake.cc', |
| 185 | 'bluetooth/bluetooth_classic_win_fake.h', |
gogerald | cab3123 | 2016-02-03 21:20:33 | [diff] [blame] | 186 | 'bluetooth/bluetooth_low_energy_win_fake.h', |
| 187 | 'bluetooth/bluetooth_low_energy_win_fake.cc', |
| 188 | ], |
| 189 | }], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 190 | ], |
| 191 | }, |
| 192 | ], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 193 | 'conditions': [ |
| 194 | ['OS=="android"', { |
| 195 | 'targets': [ |
| 196 | { |
| 197 | 'target_name': 'device_unittests_apk', |
| 198 | 'type': 'none', |
| 199 | 'dependencies': [ |
| 200 | 'device_unittests', |
| 201 | ], |
| 202 | 'variables': { |
| 203 | 'test_suite_name': 'device_unittests', |
| 204 | }, |
| 205 | 'includes': [ '../build/apk_test.gypi' ], |
| 206 | }, |
scheib | 56010cc | 2015-06-25 01:29:47 | [diff] [blame] | 207 | { |
| 208 | 'target_name': 'device_bluetooth_test_jni_headers', |
| 209 | 'type': 'none', |
| 210 | 'sources': [ |
scheib | 545d7fd | 2015-06-30 22:26:58 | [diff] [blame] | 211 | 'bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java', |
scheib | 56010cc | 2015-06-25 01:29:47 | [diff] [blame] | 212 | ], |
| 213 | 'variables': { |
| 214 | 'jni_gen_package': 'device_bluetooth', |
| 215 | }, |
| 216 | 'includes': [ '../build/jni_generator.gypi' ], |
| 217 | }, |
| 218 | { |
| 219 | 'target_name': 'device_bluetooth_test_java', |
| 220 | 'type': 'none', |
| 221 | 'dependencies': [ |
| 222 | 'bluetooth/bluetooth.gyp:device_bluetooth_java', |
| 223 | ], |
| 224 | 'variables': { |
| 225 | 'java_in_dir': 'bluetooth/test/android/java', |
| 226 | }, |
| 227 | 'includes': [ '../build/java.gypi' ], |
| 228 | }, |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 229 | ], |
stip | 269b92f | 2015-10-01 07:53:55 | [diff] [blame] | 230 | 'conditions': [ |
| 231 | ['test_isolation_mode != "noop"', { |
| 232 | 'targets': [ |
| 233 | { |
| 234 | 'target_name': 'device_unittests_apk_run', |
| 235 | 'type': 'none', |
| 236 | 'dependencies': [ |
| 237 | 'device_unittests_apk', |
| 238 | ], |
| 239 | 'includes': [ |
| 240 | '../build/isolate.gypi', |
| 241 | ], |
| 242 | 'sources': [ |
| 243 | 'device_unittests_apk.isolate', |
| 244 | ], |
| 245 | }, |
| 246 | ], |
| 247 | }], |
| 248 | ], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 249 | }], |
reillyg | dffcf17 | 2015-06-30 23:13:35 | [diff] [blame] | 250 | ['test_isolation_mode != "noop"', { |
| 251 | 'targets': [ |
| 252 | { |
| 253 | 'target_name': 'device_unittests_run', |
| 254 | 'type': 'none', |
| 255 | 'dependencies': [ |
| 256 | 'device_unittests', |
| 257 | ], |
| 258 | 'includes': [ |
| 259 | '../build/isolate.gypi', |
| 260 | ], |
| 261 | 'sources': [ |
| 262 | 'device_unittests.isolate', |
| 263 | ] |
| 264 | } |
| 265 | ] |
| 266 | }] |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 267 | ], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 268 | } |