Fix componene debug build failure because of src/media/blink
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blob67c55948881e4d540141f6bc742141d09e594e57
1 # Copyright 2014 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   'targets': [
7     {
8       'target_name': 'remoting_test_common',
9       'type': 'static_library',
10       'dependencies': [
11         '../base/base.gyp:base',
12         '../components/components.gyp:policy_component_test_support',
13         '../net/net.gyp:net_test_support',
14         '../testing/gmock.gyp:gmock',
15         '../testing/gtest.gyp:gtest',
16         'remoting_base',
17         'remoting_client',
18         'remoting_host',
19         'remoting_protocol',
20         'remoting_resources',
21       ],
22       'sources': [
23         'host/fake_desktop_capturer.cc',
24         'host/fake_desktop_capturer.h',
25         'host/fake_desktop_environment.cc',
26         'host/fake_desktop_environment.h',
27         'host/fake_host_status_monitor.h',
28         'host/fake_mouse_cursor_monitor.cc',
29         'host/fake_mouse_cursor_monitor.h',
30         'protocol/fake_authenticator.cc',
31         'protocol/fake_authenticator.h',
32         'protocol/fake_datagram_socket.cc',
33         'protocol/fake_datagram_socket.h',
34         'protocol/fake_session.cc',
35         'protocol/fake_session.h',
36         'protocol/fake_stream_socket.cc',
37         'protocol/fake_stream_socket.h',
38         'protocol/protocol_mock_objects.cc',
39         'protocol/protocol_mock_objects.h',
40         'signaling/fake_signal_strategy.cc',
41         'signaling/fake_signal_strategy.h',
42         'signaling/mock_signal_strategy.cc',
43         'signaling/mock_signal_strategy.h',
44         'test/fake_network_dispatcher.cc',
45         'test/fake_network_dispatcher.h',
46         'test/fake_network_manager.cc',
47         'test/fake_network_manager.h',
48         'test/fake_port_allocator.cc',
49         'test/fake_port_allocator.h',
50         'test/fake_socket_factory.cc',
51         'test/fake_socket_factory.h',
52         'test/leaky_bucket.cc',
53         'test/leaky_bucket.h',
54       ],
55       'conditions': [
56         ['enable_remoting_host == 0', {
57           'dependencies!': [
58             'remoting_host',
59           ],
60           'sources/': [
61             ['exclude', '^host/'],
62           ]
63         }],
64       ],
65     },
67     # Remoting unit tests
68     {
69       'target_name': 'remoting_unittests',
70       'type': '<(gtest_target_type)',
71       'dependencies': [
72         '../base/base.gyp:base',
73         '../base/base.gyp:base_i18n',
74         '../base/base.gyp:test_support_base',
75         '../components/components.gyp:policy',
76         '../ipc/ipc.gyp:ipc',
77         '../net/net.gyp:net_test_support',
78         '../ppapi/ppapi.gyp:ppapi_cpp',
79         '../testing/gmock.gyp:gmock',
80         '../testing/gtest.gyp:gtest',
81         '../third_party/libyuv/libyuv.gyp:libyuv',
82         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
83         '../ui/base/ui_base.gyp:ui_base',
84         '../ui/gfx/gfx.gyp:gfx',
85         '../ui/gfx/gfx.gyp:gfx_geometry',
86         'remoting_base',
87         'remoting_breakpad',
88         'remoting_client',
89         'remoting_client_plugin',
90         'remoting_host',
91         'remoting_host_setup_base',
92         'remoting_it2me_host_static',
93         'remoting_native_messaging_base',
94         'remoting_protocol',
95         'remoting_resources',
96         'remoting_test_common',
97       ],
98       'defines': [
99         'VERSION=<(version_full)',
100       ],
101       'include_dirs': [
102         '../testing/gmock/include',
103       ],
104       'sources': [
105         'base/auth_token_util_unittest.cc',
106         'base/auto_thread_task_runner_unittest.cc',
107         'base/auto_thread_unittest.cc',
108         'base/breakpad_win_unittest.cc',
109         'base/capabilities_unittest.cc',
110         'base/compound_buffer_unittest.cc',
111         'base/rate_counter_unittest.cc',
112         'base/resources_unittest.cc',
113         'base/rsa_key_pair_unittest.cc',
114         'base/run_all_unittests.cc',
115         'base/running_average_unittest.cc',
116         'base/test_rsa_key_pair.h',
117         'base/typed_buffer_unittest.cc',
118         'base/util_unittest.cc',
119         'client/audio_player_unittest.cc',
120         'client/client_status_logger_unittest.cc',
121         'client/key_event_mapper_unittest.cc',
122         'client/plugin/empty_cursor_filter_unittest.cc',
123         'client/plugin/normalizing_input_filter_cros_unittest.cc',
124         'client/plugin/normalizing_input_filter_mac_unittest.cc',
125         'client/server_log_entry_client_unittest.cc',
126         'codec/audio_encoder_opus_unittest.cc',
127         'codec/codec_test.cc',
128         'codec/codec_test.h',
129         'codec/video_decoder_vpx_unittest.cc',
130         'codec/video_encoder_helper_unittest.cc',
131         'codec/video_encoder_verbatim_unittest.cc',
132         'codec/video_encoder_vpx_unittest.cc',
133         'host/audio_silence_detector_unittest.cc',
134         'host/branding.cc',
135         'host/branding.h',
136         'host/capture_scheduler_unittest.cc',
137         'host/chromeos/aura_desktop_capturer_unittest.cc',
138         'host/chromeos/clipboard_aura_unittest.cc',
139         'host/chromoting_host_context_unittest.cc',
140         'host/chromoting_host_unittest.cc',
141         'host/client_session_unittest.cc',
142         'host/config_file_watcher_unittest.cc',
143         'host/daemon_process_unittest.cc',
144         'host/desktop_process_unittest.cc',
145         'host/desktop_shape_tracker_unittest.cc',
146         'host/fake_desktop_capturer.cc',
147         'host/fake_desktop_capturer.h',
148         'host/fake_host_extension.cc',
149         'host/fake_host_extension.h',
150         'host/fake_host_status_monitor.h',
151         'host/gnubby_auth_handler_posix_unittest.cc',
152         'host/heartbeat_sender_unittest.cc',
153         'host/host_change_notification_listener_unittest.cc',
154         'host/host_config_unittest.cc',
155         'host/host_extension_session_manager_unittest.cc',
156         'host/host_mock_objects.cc',
157         'host/host_status_logger_unittest.cc',
158         'host/ipc_desktop_environment_unittest.cc',
159         'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
160         'host/it2me/it2me_native_messaging_host_unittest.cc',
161         'host/linux/audio_pipe_reader_unittest.cc',
162         'host/linux/unicode_to_keysym_unittest.cc',
163         'host/linux/x_server_clipboard_unittest.cc',
164         'host/local_input_monitor_unittest.cc',
165         'host/native_messaging/native_messaging_reader_unittest.cc',
166         'host/native_messaging/native_messaging_writer_unittest.cc',
167         'host/pairing_registry_delegate_linux_unittest.cc',
168         'host/pairing_registry_delegate_win_unittest.cc',
169         'host/pin_hash_unittest.cc',
170         'host/policy_watcher_unittest.cc',
171         'host/register_support_host_request_unittest.cc',
172         'host/remote_input_filter_unittest.cc',
173         'host/resizing_host_observer_unittest.cc',
174         'host/screen_resolution_unittest.cc',
175         'host/server_log_entry_host_unittest.cc',
176         'host/setup/me2me_native_messaging_host.cc',
177         'host/setup/me2me_native_messaging_host.h',
178         'host/setup/me2me_native_messaging_host_unittest.cc',
179         'host/setup/oauth_helper_unittest.cc',
180         'host/setup/pin_validator_unittest.cc',
181         'host/shaped_desktop_capturer_unittest.cc',
182         'host/token_validator_factory_impl_unittest.cc',
183         'host/video_frame_recorder_unittest.cc',
184         'host/video_scheduler_unittest.cc',
185         'host/win/rdp_client_unittest.cc',
186         'host/win/worker_process_launcher.cc',
187         'host/win/worker_process_launcher.h',
188         'host/win/worker_process_launcher_unittest.cc',
189         'protocol/authenticator_test_base.cc',
190         'protocol/authenticator_test_base.h',
191         'protocol/buffered_socket_writer_unittest.cc',
192         'protocol/channel_multiplexer_unittest.cc',
193         'protocol/chromium_socket_factory_unittest.cc',
194         'protocol/clipboard_echo_filter_unittest.cc',
195         'protocol/clipboard_filter_unittest.cc',
196         'protocol/connection_tester.cc',
197         'protocol/connection_tester.h',
198         'protocol/connection_to_client_unittest.cc',
199         'protocol/content_description_unittest.cc',
200         'protocol/input_event_tracker_unittest.cc',
201         'protocol/input_filter_unittest.cc',
202         'protocol/jingle_messages_unittest.cc',
203         'protocol/jingle_session_unittest.cc',
204         'protocol/message_decoder_unittest.cc',
205         'protocol/message_reader_unittest.cc',
206         'protocol/monitored_video_stub_unittest.cc',
207         'protocol/mouse_input_filter_unittest.cc',
208         'protocol/negotiating_authenticator_unittest.cc',
209         'protocol/network_settings_unittest.cc',
210         'protocol/pairing_registry_unittest.cc',
211         'protocol/ppapi_module_stub.cc',
212         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
213         'protocol/third_party_authenticator_unittest.cc',
214         'protocol/v2_authenticator_unittest.cc',
215         'signaling/fake_signal_strategy.cc',
216         'signaling/fake_signal_strategy.h',
217         'signaling/iq_sender_unittest.cc',
218         'signaling/log_to_server_unittest.cc',
219         'signaling/server_log_entry_unittest.cc',
220         'signaling/server_log_entry_unittest.h',
221       ],
222       'conditions': [
223         [ 'OS=="win"', {
224           'defines': [
225             '_ATL_NO_EXCEPTIONS',
226           ],
227           'include_dirs': [
228             '../breakpad/src',
229           ],
230           'link_settings': {
231             'libraries': [
232               '-lrpcrt4.lib',
233               '-lwtsapi32.lib',
234             ],
235           },
236         }],
237         [ 'OS=="android"', {
238           'dependencies!': [
239             'remoting_client_plugin',
240           ],
241         }],
242         [ 'OS=="android"', {
243           'dependencies': [
244             '../testing/android/native_test.gyp:native_test_native_code',
245           ],
246         }],
247         [ 'chromeos==0', {
248           'sources!': [
249             'client/plugin/normalizing_input_filter_cros_unittest.cc',
250             'host/chromeos/aura_desktop_capturer_unittest.cc',
251             'host/clipboard_aura_unittest.cc',
252           ],
253         }, { # chromeos==1
254           'sources!': [
255             'host/linux/x_server_clipboard_unittest.cc',
256             'host/local_input_monitor_unittest.cc',
257           ],
258         }],
259         [ 'use_ozone==1', {
260           'sources!': [
261             'host/local_input_monitor_unittest.cc',
262           ],
263         }],
264         ['enable_remoting_host == 0', {
265           'dependencies!': [
266             'remoting_host',
267             'remoting_host_setup_base',
268             'remoting_native_messaging_base',
269           ],
270           'sources/': [
271             ['exclude', '^codec/'],
272             ['exclude', '^host/'],
273             ['exclude', '^base/resources_unittest\\.cc$'],
274           ]
275         }],
276         ['enable_it2me_host == 0', {
277           'dependencies!': [
278             'remoting_it2me_host_static',
279           ],
280           'sources/': [
281             ['exclude', '^host/it2me/'],
282           ]
283         }],
284         [ 'OS == "linux" and use_allocator!="none"', {
285           'dependencies': [
286             '../base/allocator/allocator.gyp:allocator',
287           ],
288         }],
289       ],  # end of 'conditions'
290     },  # end of target 'remoting_unittests'
291     {
292       'target_name': 'remoting_browser_test_resources',
293       'type': 'none',
294       'copies': [
295         {
296           'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
297             'files': [
298               '<@(remoting_webapp_js_test_common_files)',
299               '<@(remoting_webapp_js_browser_test_files)',
300             ],
301         },
302       ], #end of copies
303     },  # end of target 'remoting_browser_test_resources'
304     {
305       'target_name': 'remoting_webapp_unittest',
306       'type': 'none',
307       'variables': {
308         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
309         'webapp_js_files': [
310           '<@(remoting_webapp_shared_main_html_js_files)',
311           '<@(remoting_webapp_js_wcs_sandbox_files)',
312           '<@(remoting_webapp_background_js_files)',
313         ]
314       },
315       'copies': [
316         {
317           'destination': '<(output_dir)/qunit',
318           'files': [
319             '../third_party/qunit/src/browser_test_harness.js',
320             '../third_party/qunit/src/qunit.css',
321             '../third_party/qunit/src/qunit.js',
322           ],
323         },
324         {
325           'destination': '<(output_dir)/blanketjs',
326           'files': [
327             '../third_party/blanketjs/src/blanket.js',
328             '../third_party/blanketjs/src/qunit_adapter.js',
329           ],
330         },
331         {
332           'destination': '<(output_dir)/sinonjs',
333           'files': [
334             '../third_party/sinonjs/src/sinon.js',
335             '../third_party/sinonjs/src/sinon-qunit.js',
336           ],
337         },
338         {
339           'destination': '<(output_dir)',
340           'files': [
341             '<@(webapp_js_files)',
342             '<@(remoting_webapp_js_test_common_files)',
343             '<@(remoting_webapp_unittest_additional_files)',
344             '<@(remoting_webapp_unittest_js_files)',
345           ],
346         },
347       ],
348       'actions': [
349         {
350           'action_name': 'Build Remoting Webapp unittest.html',
351           'inputs': [
352             'webapp/build-html.py',
353             '<(remoting_webapp_unittest_template_main)',
354             '<@(webapp_js_files)',
355             '<@(remoting_webapp_js_test_common_files)',
356             '<@(remoting_webapp_unittest_js_files)'
357           ],
358           'outputs': [
359             '<(output_dir)/unittest.html',
360           ],
361           'action': [
362             'python', 'webapp/build-html.py',
363             '<@(_outputs)',
364             '<(remoting_webapp_unittest_template_main)',
365             # GYP automatically removes subsequent duplicated command line
366             # arguments.  Therefore, the excludejs flag must be set before the
367             # instrumentedjs flag or else GYP will ignore the files in the
368             # exclude list.
369             '--exclude-js', '<@(remoting_webapp_unittest_exclude_files)',
370             '--js', '<@(remoting_webapp_unittest_js_files)',
371             '<@(remoting_webapp_js_test_common_files)',
372             '--instrument-js', '<@(webapp_js_files)',
373            ],
374         },
375       ],
376     },  # end of target 'remoting_webapp_js_unittest'
377   ],  # end of targets
379   'conditions': [
380     ['enable_remoting_host==1', {
381       'targets': [
382         # Remoting performance tests
383         {
384           'target_name': 'remoting_perftests',
385           'type': '<(gtest_target_type)',
386           'dependencies': [
387             '../base/base.gyp:base',
388             '../base/base.gyp:test_support_base',
389             '../testing/gtest.gyp:gtest',
390             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
391             '../third_party/libjingle/libjingle.gyp:libjingle',
392             'remoting_base',
393             'remoting_test_common',
394           ],
395           'defines': [
396             'VERSION=<(version_full)',
397           ],
398           'include_dirs': [
399             '../testing/gmock/include',
400           ],
401           'sources': [
402             'base/run_all_unittests.cc',
403             'codec/codec_test.cc',
404             'codec/codec_test.h',
405             'codec/video_encoder_vpx_perftest.cc',
406             'test/protocol_perftest.cc',
407           ],
408           'conditions': [
409             [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
410               # RunAllTests calls chrome::RegisterPathProvider() under Mac and
411               # Linux, so we need the chrome_common.gypi dependency.
412               'dependencies': [
413                 '../chrome/common_constants.gyp:common_constants',
414               ],
415             }],
416             [ 'OS=="android"', {
417               'dependencies': [
418                 '../testing/android/native_test.gyp:native_test_native_code',
419               ],
420             }],
421             [ 'OS == "linux" and use_allocator!="none"', {
422               'dependencies': [
423                 '../base/allocator/allocator.gyp:allocator',
424               ],
425             }],
426           ],  # end of 'conditions'
427         },  # end of target 'remoting_perftests'
428       ]
429     }]
430   ]