Clean up logging in MB.
[chromium-blink-merge.git] / device / device_tests.gyp
blob864a32071872fa7582b46db0d3a1fc4d828c37db
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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'device_unittests',
12       'type': '<(gtest_target_type)',
13       'dependencies': [
14         '../base/base.gyp:test_support_base',
15         '../mojo/mojo_base.gyp:mojo_environment_chromium',
16         '../testing/gmock.gyp:gmock',
17         '../testing/gtest.gyp:gtest',
18         '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
19         '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
20         '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
21         'battery/battery.gyp:device_battery',
22         'battery/battery.gyp:device_battery_mojo_bindings',
23         'bluetooth/bluetooth.gyp:device_bluetooth',
24         'bluetooth/bluetooth.gyp:device_bluetooth_mocks',
25         'core/core.gyp:device_core',
26         'devices_app/devices_app.gyp:devices_app_lib',
27         'nfc/nfc.gyp:device_nfc',
28         'usb/usb.gyp:device_usb',
29         'usb/usb.gyp:device_usb_mocks',
30         'hid/hid.gyp:device_hid',
31         'serial/serial.gyp:device_serial',
32         'serial/serial.gyp:device_serial_test_util',
33       ],
34       'sources': [
35         'battery/battery_status_manager_linux_unittest.cc',
36         'battery/battery_status_manager_win_unittest.cc',
37         'battery/battery_status_service_unittest.cc',
38         'bluetooth/bluetooth_adapter_mac_unittest.mm',
39         'bluetooth/bluetooth_adapter_profile_chromeos_unittest.cc',
40         'bluetooth/bluetooth_adapter_unittest.cc',
41         'bluetooth/bluetooth_adapter_win_unittest.cc',
42         'bluetooth/bluetooth_advertisement_chromeos_unittest.cc',
43         'bluetooth/bluetooth_advertisement_unittest.cc',
44         'bluetooth/bluetooth_audio_sink_chromeos_unittest.cc',
45         'bluetooth/bluetooth_chromeos_unittest.cc',
46         'bluetooth/bluetooth_device_unittest.cc',
47         'bluetooth/bluetooth_device_win_unittest.cc',
48         'bluetooth/bluetooth_discovery_filter_unittest.cc',
49         'bluetooth/bluetooth_gatt_chromeos_unittest.cc',
50         'bluetooth/bluetooth_low_energy_win_unittest.cc',
51         'bluetooth/bluetooth_service_record_win_unittest.cc',
52         'bluetooth/bluetooth_socket_chromeos_unittest.cc',
53         'bluetooth/bluetooth_task_manager_win_unittest.cc',
54         'bluetooth/bluetooth_uuid_unittest.cc',
55         'bluetooth/test/bluetooth_test.cc',
56         'bluetooth/test/bluetooth_test.h',
57         'bluetooth/test/bluetooth_test_android.cc',
58         'bluetooth/test/bluetooth_test_android.h',
59         'bluetooth/test/bluetooth_test_mac.h',
60         'bluetooth/test/bluetooth_test_mac.mm',
61         'bluetooth/test/test_bluetooth_adapter_observer.cc',
62         'bluetooth/test/test_bluetooth_adapter_observer.h',
63         'devices_app/usb/device_impl_unittest.cc',
64         'devices_app/usb/device_manager_impl_unittest.cc',
65         'hid/hid_connection_unittest.cc',
66         'hid/hid_device_filter_unittest.cc',
67         'hid/hid_report_descriptor_unittest.cc',
68         'hid/input_service_linux_unittest.cc',
69         'hid/test_report_descriptors.cc',
70         'hid/test_report_descriptors.h',
71         'nfc/nfc_chromeos_unittest.cc',
72         'nfc/nfc_ndef_record_unittest.cc',
73         'serial/data_sink_unittest.cc',
74         'serial/data_source_unittest.cc',
75         'serial/serial_connection_unittest.cc',
76         "serial/serial_io_handler_posix_unittest.cc",
77         'serial/serial_service_unittest.cc',
78         'test/run_all_unittests.cc',
79         'test/test_device_client.cc',
80         'test/test_device_client.h',
81         'test/usb_test_gadget_impl.cc',
82         'usb/usb_context_unittest.cc',
83         'usb/usb_descriptors_unittest.cc',
84         'usb/usb_device_filter_unittest.cc',
85         'usb/usb_device_handle_unittest.cc',
86         'usb/usb_ids_unittest.cc',
87         'usb/usb_service_unittest.cc',
88         'usb/webusb_descriptors_unittest.cc',
89       ],
90       'conditions': [
91         ['chromeos==1', {
92           'dependencies': [
93             '../build/linux/system.gyp:dbus',
94             '../chromeos/chromeos.gyp:chromeos_test_support',
95             '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
96             '../dbus/dbus.gyp:dbus',
97           ],
98           'sources!': [
99             'battery/battery_status_manager_linux_unittest.cc',
100           ],
101         }],
102         ['OS=="android"', {
103           'dependencies!': [
104             '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
105             'battery/battery.gyp:device_battery',
106             'devices_app/devices_app.gyp:devices_app_lib',
107             'usb/usb.gyp:device_usb',
108             'usb/usb.gyp:device_usb_mocks',
109             'serial/serial.gyp:device_serial',
110             'serial/serial.gyp:device_serial_test_util',
111             'hid/hid.gyp:device_hid',
112           ],
113           'dependencies': [
114             '../testing/android/native_test.gyp:native_test_native_code',
115             'device_bluetooth_test_java',
116             'device_bluetooth_test_jni_headers',
117           ],
118           'sources/': [
119             ['exclude', '(^|/)hid'],
120             ['exclude', '(^|/)serial'],
121             ['exclude', '(^|/)usb'],
122           ],
123           'sources!': [
124             'battery/battery_status_service_unittest.cc',
125           ],
126         }],
127         ['OS=="mac"', {
128           'dependencies': [
129             '../third_party/ocmock/ocmock.gyp:ocmock',
130           ],
131           'link_settings': {
132             'libraries': [
133               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
134             ],
135           },
136           'xcode_settings' : {
137             'OTHER_LDFLAGS' : [
138               '-ObjC',
139             ],
140           },
141         }],
142         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
143           'conditions': [
144             ['use_allocator!="none"', {
145               'dependencies': [
146                 '../base/allocator/allocator.gyp:allocator',
147               ],
148             }],
149           ],
150         }],
151         ['use_udev==1', {
152           'dependencies': [
153             'udev_linux/udev.gyp:udev_linux',
154           ],
155           'sources': [
156             'udev_linux/udev_unittest.cc',
157           ],
158         }],
159         ['OS=="linux" and use_udev==0', {
160           # Udev is the only Linux implementation. If we're compiling without
161           # Udev, disable these unittests.
162           'dependencies!': [
163             'hid/hid.gyp:device_hid',
164             'serial/serial.gyp:device_serial',
165             'serial/serial.gyp:device_serial_test_util',
166           ],
167           'sources/': [
168             ['exclude', '^serial/'],
169             ['exclude', '^hid/'],
170           ],
171         }],
172         ['use_dbus==0', {
173           'sources!': [
174             'battery/battery_status_manager_linux_unittest.cc',
175           ],
176         }],
177       ],
178     },
179   ],
180   'conditions': [
181     ['OS=="android"', {
182       'targets': [
183         {
184           'target_name': 'device_unittests_apk',
185           'type': 'none',
186           'dependencies': [
187             'device_unittests',
188           ],
189           'variables': {
190             'test_suite_name': 'device_unittests',
191           },
192           'includes': [ '../build/apk_test.gypi' ],
193         },
194         {
195           'target_name': 'device_bluetooth_test_jni_headers',
196           'type': 'none',
197           'sources': [
198             'bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java',
199           ],
200           'variables': {
201             'jni_gen_package': 'device_bluetooth',
202           },
203           'includes': [ '../build/jni_generator.gypi' ],
204         },
205         {
206           'target_name': 'device_bluetooth_test_java',
207           'type': 'none',
208           'dependencies': [
209             'bluetooth/bluetooth.gyp:device_bluetooth_java',
210           ],
211           'variables': {
212             'java_in_dir': 'bluetooth/test/android/java',
213           },
214           'includes': [ '../build/java.gypi' ],
215         },
216       ],
217     }],
218     ['test_isolation_mode != "noop"', {
219       'targets': [
220         {
221           'target_name': 'device_unittests_run',
222           'type': 'none',
223           'dependencies': [
224             'device_unittests',
225           ],
226           'includes': [
227             '../build/isolate.gypi',
228           ],
229           'sources': [
230             'device_unittests.isolate',
231           ]
232         }
233       ]
234     }]
235   ],