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