Reland: Move more tests from ChromeShellTest to ChromePublicTest
[chromium-blink-merge.git] / device / device_tests.gyp
blobbbfdf7cd384a08a62b734b5c7a05365aa24c7514
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_audio_sink_chromeos_unittest.cc',
44         'bluetooth/bluetooth_chromeos_unittest.cc',
45         'bluetooth/bluetooth_device_unittest.cc',
46         'bluetooth/bluetooth_device_win_unittest.cc',
47         'bluetooth/bluetooth_discovery_filter_unittest.cc',
48         'bluetooth/bluetooth_gatt_chromeos_unittest.cc',
49         'bluetooth/bluetooth_low_energy_win_unittest.cc',
50         'bluetooth/bluetooth_service_record_win_unittest.cc',
51         'bluetooth/bluetooth_socket_chromeos_unittest.cc',
52         'bluetooth/bluetooth_task_manager_win_unittest.cc',
53         'bluetooth/bluetooth_uuid_unittest.cc',
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',
58         'bluetooth/test/bluetooth_test_mac.h',
59         'bluetooth/test/bluetooth_test_mac.mm',
60         'bluetooth/test/test_bluetooth_adapter_observer.cc',
61         'bluetooth/test/test_bluetooth_adapter_observer.h',
62         'devices_app/usb/device_impl_unittest.cc',
63         'devices_app/usb/device_manager_impl_unittest.cc',
64         'hid/hid_connection_unittest.cc',
65         'hid/hid_device_filter_unittest.cc',
66         'hid/hid_report_descriptor_unittest.cc',
67         'hid/input_service_linux_unittest.cc',
68         'hid/test_report_descriptors.cc',
69         'hid/test_report_descriptors.h',
70         'nfc/nfc_chromeos_unittest.cc',
71         'nfc/nfc_ndef_record_unittest.cc',
72         'serial/data_sink_unittest.cc',
73         'serial/data_source_unittest.cc',
74         'serial/serial_connection_unittest.cc',
75         'serial/serial_service_unittest.cc',
76         'test/run_all_unittests.cc',
77         'test/usb_test_gadget_impl.cc',
78         'usb/usb_context_unittest.cc',
79         'usb/usb_device_filter_unittest.cc',
80         'usb/usb_device_handle_unittest.cc',
81         'usb/usb_ids_unittest.cc',
82         'usb/usb_service_unittest.cc',
83       ],
84       'conditions': [
85         ['chromeos==1', {
86           'dependencies': [
87             '../build/linux/system.gyp:dbus',
88             '../chromeos/chromeos.gyp:chromeos_test_support',
89             '../chromeos/chromeos.gyp:chromeos_test_support_without_gmock',
90             '../dbus/dbus.gyp:dbus',
91           ],
92           'sources!': [
93             'battery/battery_status_manager_linux_unittest.cc',
94           ],
95         }],
96         ['OS=="android"', {
97           'dependencies!': [
98             '../tools/usb_gadget/usb_gadget.gyp:usb_gadget',
99             'devices_app/devices_app.gyp:devices_app_lib',
100             'usb/usb.gyp:device_usb',
101             'usb/usb.gyp:device_usb_mocks',
102             'serial/serial.gyp:device_serial',
103             'serial/serial.gyp:device_serial_test_util',
104             'hid/hid.gyp:device_hid',
105           ],
106           'dependencies': [
107             '../testing/android/native_test.gyp:native_test_native_code',
108             'device_bluetooth_test_java',
109             'device_bluetooth_test_jni_headers',
110           ],
111           'sources/': [
112             ['exclude', '(^|/)hid'],
113             ['exclude', '(^|/)serial'],
114             ['exclude', '(^|/)usb'],
115           ],
116         }],
117         ['OS=="mac"', {
118           'dependencies': [
119             '../third_party/ocmock/ocmock.gyp:ocmock',
120           ],
121           'link_settings': {
122             'libraries': [
123               '$(SDKROOT)/System/Library/Frameworks/IOBluetooth.framework',
124             ],
125           },
126           'xcode_settings' : {
127             'OTHER_LDFLAGS' : [
128               '-ObjC',
129             ],
130           },
131         }],
132         ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
133           'conditions': [
134             ['use_allocator!="none"', {
135               'dependencies': [
136                 '../base/allocator/allocator.gyp:allocator',
137               ],
138             }],
139           ],
140         }],
141         ['use_udev==1', {
142           'dependencies': [
143             'udev_linux/udev.gyp:udev_linux',
144           ],
145           'sources': [
146             'udev_linux/udev_unittest.cc',
147           ],
148         }],
149         ['OS=="linux" and use_udev==0', {
150           # Udev is the only Linux implementation. If we're compiling without
151           # Udev, disable these unittests.
152           'dependencies!': [
153             'hid/hid.gyp:device_hid',
154             'serial/serial.gyp:device_serial',
155             'serial/serial.gyp:device_serial_test_util',
156           ],
157           'sources/': [
158             ['exclude', '^serial/'],
159             ['exclude', '^hid/'],
160           ],
161         }],
162         ['use_dbus==0', {
163           'sources!': [
164             'battery/battery_status_manager_linux_unittest.cc',
165           ],
166         }],
167       ],
168     },
169   ],
170   'conditions': [
171     ['OS=="android"', {
172       'targets': [
173         {
174           'target_name': 'device_unittests_apk',
175           'type': 'none',
176           'dependencies': [
177             'device_unittests',
178           ],
179           'variables': {
180             'test_suite_name': 'device_unittests',
181           },
182           'includes': [ '../build/apk_test.gypi' ],
183         },
184         {
185           'target_name': 'device_bluetooth_test_jni_headers',
186           'type': 'none',
187           'sources': [
188             'bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java',
189           ],
190           'variables': {
191             'jni_gen_package': 'device_bluetooth',
192           },
193           'includes': [ '../build/jni_generator.gypi' ],
194         },
195         {
196           'target_name': 'device_bluetooth_test_java',
197           'type': 'none',
198           'dependencies': [
199             'bluetooth/bluetooth.gyp:device_bluetooth_java',
200           ],
201           'variables': {
202             'java_in_dir': 'bluetooth/test/android/java',
203           },
204           'includes': [ '../build/java.gypi' ],
205         },
206       ],
207     }],
208     ['test_isolation_mode != "noop"', {
209       'targets': [
210         {
211           'target_name': 'device_unittests_run',
212           'type': 'none',
213           'dependencies': [
214             'device_unittests',
215           ],
216           'includes': [
217             '../build/isolate.gypi',
218           ],
219           'sources': [
220             'device_unittests.isolate',
221           ]
222         }
223       ]
224     }]
225   ],