blob: 8b1545a0b9ebb7cab1e47d5b64844d16ab3954a5 [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',
[email protected]b763b842013-12-03 10:37:1525 'nfc/nfc.gyp:device_nfc',
[email protected]e3a9ccfc2013-06-03 00:22:3026 'usb/usb.gyp:device_usb',
[email protected]125724f2014-01-31 20:13:2327 'hid/hid.gyp:device_hid',
[email protected]9a1be232014-07-09 13:04:2628 'serial/serial.gyp:device_serial',
[email protected]b50715c2014-07-21 07:18:3229 'serial/serial.gyp:device_serial_test_util',
[email protected]cab208eb02012-10-18 22:15:2330 ],
31 'sources': [
ppi2438a3e2014-10-28 21:55:1032 'battery/battery_status_manager_linux_unittest.cc',
33 'battery/battery_status_manager_win_unittest.cc',
34 'battery/battery_status_service_unittest.cc',
[email protected]1073598a2013-03-04 19:27:4335 'bluetooth/bluetooth_adapter_mac_unittest.mm',
fgorski7915eee2015-02-12 23:03:3136 'bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc',
tfarinacdc7e5d2015-02-23 09:52:2437 'bluetooth/bluetooth_adapter_unittest.cc',
[email protected]cae636d2012-11-14 00:47:4838 'bluetooth/bluetooth_adapter_win_unittest.cc',
mcchou6cf69f32015-02-03 02:11:5539 'bluetooth/bluetooth_audio_sink_chromeos_unittest.cc',
tfarinacdc7e5d2015-02-23 09:52:2440 'bluetooth/bluetooth_chromeos_unittest.cc',
[email protected]db00ff82014-05-17 05:49:4641 'bluetooth/bluetooth_device_unittest.cc',
[email protected]edcaf14a2013-02-25 17:46:3642 'bluetooth/bluetooth_device_win_unittest.cc',
jpawlowskif54d01542015-04-13 22:24:4343 'bluetooth/bluetooth_discovery_filter_unittest.cc',
[email protected]e65bc222014-04-08 05:18:2844 'bluetooth/bluetooth_gatt_chromeos_unittest.cc',
[email protected]2ede7a22014-06-28 00:51:4945 'bluetooth/bluetooth_low_energy_win_unittest.cc',
[email protected]47c72642013-01-20 01:09:5146 'bluetooth/bluetooth_service_record_win_unittest.cc',
[email protected]891c3942014-05-13 23:33:4047 'bluetooth/bluetooth_socket_chromeos_unittest.cc',
[email protected]0216e792013-01-16 00:28:1748 'bluetooth/bluetooth_task_manager_win_unittest.cc',
[email protected]8148ad42014-04-04 04:10:3849 'bluetooth/bluetooth_uuid_unittest.cc',
[email protected]125724f2014-01-31 20:13:2350 'hid/hid_connection_unittest.cc',
reillygf4dc9d142014-08-29 05:52:4851 'hid/hid_device_filter_unittest.cc',
[email protected]fe7b3002014-04-25 00:16:4052 'hid/hid_report_descriptor_unittest.cc',
[email protected]eedae132014-04-12 22:02:3753 'hid/input_service_linux_unittest.cc',
reillyg37cde9952015-01-13 03:07:1154 'hid/test_report_descriptors.cc',
55 'hid/test_report_descriptors.h',
tfarinacdc7e5d2015-02-23 09:52:2456 'nfc/nfc_chromeos_unittest.cc',
57 'nfc/nfc_ndef_record_unittest.cc',
[email protected]4e99a932014-08-19 06:14:0258 'serial/data_sink_unittest.cc',
[email protected]f5b07922014-08-11 12:18:5159 'serial/data_source_unittest.cc',
[email protected]b50715c2014-07-21 07:18:3260 'serial/serial_connection_unittest.cc',
[email protected]9a1be232014-07-09 13:04:2661 'serial/serial_service_unittest.cc',
62 'test/run_all_unittests.cc',
tfarinacdc7e5d2015-02-23 09:52:2463 'test/usb_test_gadget_impl.cc',
64 'usb/usb_context_unittest.cc',
65 'usb/usb_device_filter_unittest.cc',
66 'usb/usb_device_handle_unittest.cc',
67 'usb/usb_ids_unittest.cc',
68 'usb/usb_service_unittest.cc',
[email protected]cab208eb02012-10-18 22:15:2369 ],
70 'conditions': [
[email protected]06eaeb442012-10-24 18:01:0171 ['chromeos==1', {
[email protected]cab208eb02012-10-18 22:15:2372 'dependencies': [
[email protected]5c063b02012-10-22 02:56:4073 '../build/linux/system.gyp:dbus',
[email protected]cab208eb02012-10-18 22:15:2374 '../chromeos/chromeos.gyp:chromeos_test_support',
[email protected]896619e2013-04-18 04:41:4275 '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
[email protected]cab208eb02012-10-18 22:15:2376 '../dbus/dbus.gyp:dbus',
ppi2438a3e2014-10-28 21:55:1077 ],
78 'sources!': [
79 'battery/battery_status_manager_linux_unittest.cc',
80 ],
[email protected]cab208eb02012-10-18 22:15:2381 }],
scheibb63d1ea2015-03-30 21:57:3582 ['OS=="android"', {
83 'dependencies!': [
84 '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
85 'usb/usb.gyp:device_usb',
86 'serial/serial.gyp:device_serial',
87 'serial/serial.gyp:device_serial_test_util',
88 'hid/hid.gyp:device_hid',
89 ],
90 'dependencies': [
91 '../testing/android/native_test.gyp:native_test_native_code',
92 ],
93 'sources/': [
94 ['exclude', '(^|/)hid'],
95 ['exclude', '(^|/)serial'],
96 ['exclude', '(^|/)usb'],
97 ],
98 }],
[email protected]7d06ba372013-03-26 06:06:2699 ['OS=="mac"', {
100 'link_settings': {
101 'libraries': [
102 '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
103 ],
104 },
105 }],
[email protected]df941492013-01-25 01:38:27106 ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
107 'conditions': [
[email protected]2fa89ef2014-05-07 18:45:59108 ['use_allocator!="none"', {
[email protected]df941492013-01-25 01:38:27109 'dependencies': [
110 '../base/allocator/allocator.gyp:allocator',
111 ],
112 }],
113 ],
114 }],
agoodeb48f1882015-03-09 19:34:24115 ['use_udev==1', {
116 'dependencies': [
117 'udev_linux/udev.gyp:udev_linux',
118 ],
119 'sources': [
120 'udev_linux/udev_unittest.cc',
121 ],
122 }],
[email protected]7bcb65a62014-06-05 16:46:40123 ['OS=="linux" and use_udev==0', {
124 # Udev is the only Linux implementation. If we're compiling without
125 # Udev, disable these unittests.
[email protected]10d8d022014-06-05 19:37:01126 'dependencies!': [
127 'hid/hid.gyp:device_hid',
[email protected]1d655fe92014-08-18 22:14:13128 'serial/serial.gyp:device_serial',
129 'serial/serial.gyp:device_serial_test_util',
[email protected]10d8d022014-06-05 19:37:01130 ],
131 'sources/': [
[email protected]1d655fe92014-08-18 22:14:13132 ['exclude', '^serial/'],
[email protected]10d8d022014-06-05 19:37:01133 ['exclude', '^hid/'],
[email protected]7bcb65a62014-06-05 16:46:40134 ],
135 }],
ppi2438a3e2014-10-28 21:55:10136 ['use_dbus==0', {
137 'sources!': [
138 'battery/battery_status_manager_linux_unittest.cc',
139 ],
140 }],
[email protected]cab208eb02012-10-18 22:15:23141 ],
142 },
143 ],
scheibb63d1ea2015-03-30 21:57:35144 'conditions': [
145 ['OS=="android"', {
146 'targets': [
147 {
148 'target_name': 'device_unittests_apk',
149 'type': 'none',
150 'dependencies': [
151 'device_unittests',
152 ],
153 'variables': {
154 'test_suite_name': 'device_unittests',
155 },
156 'includes': [ '../build/apk_test.gypi' ],
157 },
158 ],
159 }],
160 ],
[email protected]cab208eb02012-10-18 22:15:23161}