[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', |
[email protected] | 7e77c0d | 2014-07-30 22:54:06 | [diff] [blame] | 15 | '../mojo/mojo_base.gyp:mojo_environment_chromium', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 16 | '../testing/gmock.gyp:gmock', |
| 17 | '../testing/gtest.gyp:gtest', |
blundell | 70fb54767 | 2015-01-19 17:18:33 | [diff] [blame] | 18 | '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', |
| 19 | '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings', |
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', |
[email protected] | b763b84 | 2013-12-03 10:37:15 | [diff] [blame] | 25 | 'nfc/nfc.gyp:device_nfc', |
[email protected] | e3a9ccfc | 2013-06-03 00:22:30 | [diff] [blame] | 26 | 'usb/usb.gyp:device_usb', |
reillyg | cf9be26 | 2015-05-14 16:06:06 | [diff] [blame^] | 27 | 'usb/usb.gyp:device_usb_mocks', |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 28 | 'hid/hid.gyp:device_hid', |
[email protected] | 9a1be23 | 2014-07-09 13:04:26 | [diff] [blame] | 29 | 'serial/serial.gyp:device_serial', |
[email protected] | b50715c | 2014-07-21 07:18:32 | [diff] [blame] | 30 | 'serial/serial.gyp:device_serial_test_util', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 31 | ], |
| 32 | 'sources': [ |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 33 | 'battery/battery_status_manager_linux_unittest.cc', |
| 34 | 'battery/battery_status_manager_win_unittest.cc', |
| 35 | 'battery/battery_status_service_unittest.cc', |
scheib | 35fbdd4027 | 2015-04-29 21:31:54 | [diff] [blame] | 36 | 'bluetooth/bluetooth_adapter_android_unittest.cc', |
[email protected] | 1073598a | 2013-03-04 19:27:43 | [diff] [blame] | 37 | 'bluetooth/bluetooth_adapter_mac_unittest.mm', |
fgorski | 7915eee | 2015-02-12 23:03:31 | [diff] [blame] | 38 | 'bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 39 | 'bluetooth/bluetooth_adapter_unittest.cc', |
[email protected] | cae636d | 2012-11-14 00:47:48 | [diff] [blame] | 40 | 'bluetooth/bluetooth_adapter_win_unittest.cc', |
rkc | 02b1b8c | 2015-04-28 17:28:52 | [diff] [blame] | 41 | 'bluetooth/bluetooth_advertisement_chromeos_unittest.cc', |
mcchou | 6cf69f3 | 2015-02-03 02:11:55 | [diff] [blame] | 42 | 'bluetooth/bluetooth_audio_sink_chromeos_unittest.cc', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 43 | 'bluetooth/bluetooth_chromeos_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', |
[email protected] | e65bc22 | 2014-04-08 05:18:28 | [diff] [blame] | 47 | 'bluetooth/bluetooth_gatt_chromeos_unittest.cc', |
[email protected] | 2ede7a2 | 2014-06-28 00:51:49 | [diff] [blame] | 48 | 'bluetooth/bluetooth_low_energy_win_unittest.cc', |
[email protected] | 47c7264 | 2013-01-20 01:09:51 | [diff] [blame] | 49 | 'bluetooth/bluetooth_service_record_win_unittest.cc', |
[email protected] | 891c394 | 2014-05-13 23:33:40 | [diff] [blame] | 50 | 'bluetooth/bluetooth_socket_chromeos_unittest.cc', |
[email protected] | 0216e79 | 2013-01-16 00:28:17 | [diff] [blame] | 51 | 'bluetooth/bluetooth_task_manager_win_unittest.cc', |
[email protected] | 8148ad4 | 2014-04-04 04:10:38 | [diff] [blame] | 52 | 'bluetooth/bluetooth_uuid_unittest.cc', |
scheib | 42e6b49d | 2015-04-29 21:46:57 | [diff] [blame] | 53 | 'bluetooth/test/test_bluetooth_adapter_observer.cc', |
| 54 | 'bluetooth/test/test_bluetooth_adapter_observer.h', |
[email protected] | 125724f | 2014-01-31 20:13:23 | [diff] [blame] | 55 | 'hid/hid_connection_unittest.cc', |
reillyg | f4dc9d14 | 2014-08-29 05:52:48 | [diff] [blame] | 56 | 'hid/hid_device_filter_unittest.cc', |
[email protected] | fe7b300 | 2014-04-25 00:16:40 | [diff] [blame] | 57 | 'hid/hid_report_descriptor_unittest.cc', |
[email protected] | eedae13 | 2014-04-12 22:02:37 | [diff] [blame] | 58 | 'hid/input_service_linux_unittest.cc', |
reillyg | 37cde995 | 2015-01-13 03:07:11 | [diff] [blame] | 59 | 'hid/test_report_descriptors.cc', |
| 60 | 'hid/test_report_descriptors.h', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 61 | 'nfc/nfc_chromeos_unittest.cc', |
| 62 | 'nfc/nfc_ndef_record_unittest.cc', |
[email protected] | 4e99a93 | 2014-08-19 06:14:02 | [diff] [blame] | 63 | 'serial/data_sink_unittest.cc', |
[email protected] | f5b0792 | 2014-08-11 12:18:51 | [diff] [blame] | 64 | 'serial/data_source_unittest.cc', |
[email protected] | b50715c | 2014-07-21 07:18:32 | [diff] [blame] | 65 | 'serial/serial_connection_unittest.cc', |
[email protected] | 9a1be23 | 2014-07-09 13:04:26 | [diff] [blame] | 66 | 'serial/serial_service_unittest.cc', |
| 67 | 'test/run_all_unittests.cc', |
tfarina | cdc7e5d | 2015-02-23 09:52:24 | [diff] [blame] | 68 | 'test/usb_test_gadget_impl.cc', |
| 69 | 'usb/usb_context_unittest.cc', |
| 70 | 'usb/usb_device_filter_unittest.cc', |
| 71 | 'usb/usb_device_handle_unittest.cc', |
| 72 | 'usb/usb_ids_unittest.cc', |
| 73 | 'usb/usb_service_unittest.cc', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 74 | ], |
| 75 | 'conditions': [ |
[email protected] | 06eaeb44 | 2012-10-24 18:01:01 | [diff] [blame] | 76 | ['chromeos==1', { |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 77 | 'dependencies': [ |
[email protected] | 5c063b0 | 2012-10-22 02:56:40 | [diff] [blame] | 78 | '../build/linux/system.gyp:dbus', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 79 | '../chromeos/chromeos.gyp:chromeos_test_support', |
[email protected] | 896619e | 2013-04-18 04:41:42 | [diff] [blame] | 80 | '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 81 | '../dbus/dbus.gyp:dbus', |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 82 | ], |
| 83 | 'sources!': [ |
| 84 | 'battery/battery_status_manager_linux_unittest.cc', |
| 85 | ], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 86 | }], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 87 | ['OS=="android"', { |
| 88 | 'dependencies!': [ |
| 89 | '../tools/usb_gadget/usb_gadget.gyp:usb_gadget', |
| 90 | 'usb/usb.gyp:device_usb', |
reillyg | cf9be26 | 2015-05-14 16:06:06 | [diff] [blame^] | 91 | 'usb/usb.gyp:device_usb_mocks', |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 92 | 'serial/serial.gyp:device_serial', |
| 93 | 'serial/serial.gyp:device_serial_test_util', |
| 94 | 'hid/hid.gyp:device_hid', |
| 95 | ], |
| 96 | 'dependencies': [ |
scheib | 1f48f15 | 2015-05-07 01:59:26 | [diff] [blame] | 97 | 'bluetooth/bluetooth.gyp:device_bluetooth_java', |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 98 | '../testing/android/native_test.gyp:native_test_native_code', |
| 99 | ], |
| 100 | 'sources/': [ |
| 101 | ['exclude', '(^|/)hid'], |
| 102 | ['exclude', '(^|/)serial'], |
| 103 | ['exclude', '(^|/)usb'], |
| 104 | ], |
| 105 | }], |
[email protected] | 7d06ba37 | 2013-03-26 06:06:26 | [diff] [blame] | 106 | ['OS=="mac"', { |
| 107 | 'link_settings': { |
| 108 | 'libraries': [ |
| 109 | '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework', |
| 110 | ], |
| 111 | }, |
| 112 | }], |
[email protected] | df94149 | 2013-01-25 01:38:27 | [diff] [blame] | 113 | ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', { |
| 114 | 'conditions': [ |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 115 | ['use_allocator!="none"', { |
[email protected] | df94149 | 2013-01-25 01:38:27 | [diff] [blame] | 116 | 'dependencies': [ |
| 117 | '../base/allocator/allocator.gyp:allocator', |
| 118 | ], |
| 119 | }], |
| 120 | ], |
| 121 | }], |
agoode | b48f188 | 2015-03-09 19:34:24 | [diff] [blame] | 122 | ['use_udev==1', { |
| 123 | 'dependencies': [ |
| 124 | 'udev_linux/udev.gyp:udev_linux', |
| 125 | ], |
| 126 | 'sources': [ |
| 127 | 'udev_linux/udev_unittest.cc', |
| 128 | ], |
| 129 | }], |
[email protected] | 7bcb65a6 | 2014-06-05 16:46:40 | [diff] [blame] | 130 | ['OS=="linux" and use_udev==0', { |
| 131 | # Udev is the only Linux implementation. If we're compiling without |
| 132 | # Udev, disable these unittests. |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 133 | 'dependencies!': [ |
| 134 | 'hid/hid.gyp:device_hid', |
[email protected] | 1d655fe9 | 2014-08-18 22:14:13 | [diff] [blame] | 135 | 'serial/serial.gyp:device_serial', |
| 136 | 'serial/serial.gyp:device_serial_test_util', |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 137 | ], |
| 138 | 'sources/': [ |
[email protected] | 1d655fe9 | 2014-08-18 22:14:13 | [diff] [blame] | 139 | ['exclude', '^serial/'], |
[email protected] | 10d8d02 | 2014-06-05 19:37:01 | [diff] [blame] | 140 | ['exclude', '^hid/'], |
[email protected] | 7bcb65a6 | 2014-06-05 16:46:40 | [diff] [blame] | 141 | ], |
| 142 | }], |
ppi | 2438a3e | 2014-10-28 21:55:10 | [diff] [blame] | 143 | ['use_dbus==0', { |
| 144 | 'sources!': [ |
| 145 | 'battery/battery_status_manager_linux_unittest.cc', |
| 146 | ], |
| 147 | }], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 148 | ], |
| 149 | }, |
| 150 | ], |
scheib | b63d1ea | 2015-03-30 21:57:35 | [diff] [blame] | 151 | 'conditions': [ |
| 152 | ['OS=="android"', { |
| 153 | 'targets': [ |
| 154 | { |
| 155 | 'target_name': 'device_unittests_apk', |
| 156 | 'type': 'none', |
| 157 | 'dependencies': [ |
| 158 | 'device_unittests', |
| 159 | ], |
| 160 | 'variables': { |
| 161 | 'test_suite_name': 'device_unittests', |
| 162 | }, |
| 163 | 'includes': [ '../build/apk_test.gypi' ], |
| 164 | }, |
| 165 | ], |
| 166 | }], |
| 167 | ], |
[email protected] | cab208eb0 | 2012-10-18 22:15:23 | [diff] [blame] | 168 | } |