Add localized default audio device names.
[chromium-blink-merge.git] / media / cast / cast_testing.gypi
blobd45bd826f99d88c11df5c57eb75ed0b391fb1876
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       # GN version: //media/cast:test_support
9       'target_name': 'cast_test_utility',
10       'type': 'static_library',
11       'include_dirs': [
12          '<(DEPTH)/',
13       ],
14       'dependencies': [
15         'cast_net',
16         'cast_receiver',
17         '<(DEPTH)/testing/gtest.gyp:gtest',
18         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
19         '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
20         '<(DEPTH)/third_party/mt19937ar/mt19937ar.gyp:mt19937ar',
21         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
22       ],
23       'sources': [
24         'test/fake_media_source.cc',
25         'test/fake_media_source.h',
26         'test/fake_single_thread_task_runner.cc',
27         'test/fake_single_thread_task_runner.h',
28         'test/loopback_transport.cc',
29         'test/loopback_transport.h',
30         'test/skewed_single_thread_task_runner.cc',
31         'test/skewed_single_thread_task_runner.h',
32         'test/skewed_tick_clock.cc',
33         'test/skewed_tick_clock.h',
34         'test/utility/audio_utility.cc',
35         'test/utility/audio_utility.h',
36         'test/utility/barcode.cc',
37         'test/utility/barcode.h',
38         'test/utility/default_config.cc',
39         'test/utility/default_config.h',
40         'test/utility/in_process_receiver.cc',
41         'test/utility/in_process_receiver.h',
42         'test/utility/input_builder.cc',
43         'test/utility/input_builder.h',
44         'test/utility/net_utility.cc',
45         'test/utility/net_utility.h',
46         'test/utility/standalone_cast_environment.cc',
47         'test/utility/standalone_cast_environment.h',
48         'test/utility/udp_proxy.cc',
49         'test/utility/udp_proxy.h',
50         'test/utility/video_utility.cc',
51         'test/utility/video_utility.h',
52       ], # source
53     },
54     {
55       # GN version: //media/cast:cast_unittests
56       'target_name': 'cast_unittests',
57       'type': '<(gtest_target_type)',
58       'include_dirs': [
59         '<(DEPTH)/',
60       ],
61       'dependencies': [
62         'cast_base',
63         'cast_net',
64         'cast_receiver',
65         'cast_sender',
66         'cast_test_utility',
67         # Not a true dependency. This is here to make sure the CQ can verify
68         # the tools compile correctly.
69         'cast_tools',
70         '<(DEPTH)/base/base.gyp:test_support_base',
71         '<(DEPTH)/media/media.gyp:media_test_support',
72         '<(DEPTH)/net/net.gyp:net',
73         '<(DEPTH)/testing/gmock.gyp:gmock',
74         '<(DEPTH)/testing/gtest.gyp:gtest',
75       ],
76       'sources': [
77         '<(DEPTH)/media/base/run_all_unittests.cc',
78         'logging/encoding_event_subscriber_unittest.cc',
79         'logging/logging_impl_unittest.cc',
80         'logging/logging_raw_unittest.cc',
81         'logging/receiver_time_offset_estimator_impl_unittest.cc',
82         'logging/serialize_deserialize_test.cc',
83         'logging/simple_event_subscriber_unittest.cc',
84         'logging/stats_event_subscriber_unittest.cc',
85         'net/cast_transport_sender_impl_unittest.cc',
86         'net/frame_id_wrap_helper_test.cc',
87         'net/mock_cast_transport_sender.cc',
88         'net/mock_cast_transport_sender.h',
89         'net/pacing/mock_paced_packet_sender.cc',
90         'net/pacing/mock_paced_packet_sender.h',
91         'net/pacing/paced_sender_unittest.cc',
92         'net/rtcp/receiver_rtcp_event_subscriber_unittest.cc',
93         'net/rtcp/rtcp_builder_unittest.cc',
94         'net/rtcp/rtcp_unittest.cc',
95         'net/rtcp/rtcp_utility_unittest.cc',
96 # TODO(miu): The following two are test utility modules.  Rename/move the files.
97         'net/rtcp/test_rtcp_packet_builder.cc',
98         'net/rtcp/test_rtcp_packet_builder.h',
99         'net/rtp/cast_message_builder_unittest.cc',
100         'net/rtp/frame_buffer_unittest.cc',
101         'net/rtp/framer_unittest.cc',
102         'net/rtp/mock_rtp_payload_feedback.cc',
103         'net/rtp/mock_rtp_payload_feedback.h',
104         'net/rtp/packet_storage_unittest.cc',
105         'net/rtp/receiver_stats_unittest.cc',
106         'net/rtp/rtp_header_parser.cc',
107         'net/rtp/rtp_header_parser.h',
108         'net/rtp/rtp_packet_builder.cc',
109         'net/rtp/rtp_packetizer_unittest.cc',
110         'net/rtp/rtp_parser_unittest.cc',
111         'net/rtp/rtp_receiver_defines.h',
112         'net/udp_transport_unittest.cc',
113         'receiver/audio_decoder_unittest.cc',
114         'receiver/frame_receiver_unittest.cc',
115         'receiver/video_decoder_unittest.cc',
116         'sender/audio_encoder_unittest.cc',
117         'sender/audio_sender_unittest.cc',
118         'sender/congestion_control_unittest.cc',
119         'sender/external_video_encoder_unittest.cc',
120         'sender/fake_video_encode_accelerator_factory.cc',
121         'sender/fake_video_encode_accelerator_factory.h',
122         'sender/video_encoder_unittest.cc',
123         'sender/video_sender_unittest.cc',
124         'test/end2end_unittest.cc',
125         'test/fake_receiver_time_offset_estimator.cc',
126         'test/fake_receiver_time_offset_estimator.h',
127         'test/fake_single_thread_task_runner.cc',
128         'test/fake_single_thread_task_runner.h',
129         'test/utility/audio_utility_unittest.cc',
130         'test/utility/barcode_unittest.cc',
131       ], # source
132     },
133     {
134       'target_name': 'cast_benchmarks',
135       'type': '<(gtest_target_type)',
136       'include_dirs': [
137         '<(DEPTH)/',
138       ],
139       'dependencies': [
140         'cast_base',
141         'cast_net',
142         'cast_receiver',
143         'cast_sender',
144         'cast_test_utility',
145         '<(DEPTH)/base/base.gyp:test_support_base',
146         '<(DEPTH)/net/net.gyp:net',
147         '<(DEPTH)/testing/gtest.gyp:gtest',
148       ],
149       'sources': [
150         'test/cast_benchmarks.cc',
151         'test/fake_single_thread_task_runner.cc',
152         'test/fake_single_thread_task_runner.h',
153         'test/utility/test_util.cc',
154         'test/utility/test_util.h',
155       ], # source
156       'conditions': [
157         ['os_posix==1 and OS!="mac" and OS!="ios" and use_allocator!="none"',
158           {
159             'dependencies': [
160               '<(DEPTH)/base/allocator/allocator.gyp:allocator',
161             ],
162           }
163         ],
164       ],
165     },
166     {
167       # This is a target for the collection of cast development tools.
168       # They are built on bots but not shipped.
169       'target_name': 'cast_tools',
170       'type': 'none',
171       'dependencies': [
172         'cast_receiver_app',
173         'cast_sender_app',
174         'cast_simulator',
175         'udp_proxy',
176       ],
177     },
178     {
179       'target_name': 'cast_receiver_app',
180       'type': 'executable',
181       'include_dirs': [
182         '<(DEPTH)/',
183       ],
184       'dependencies': [
185         'cast_base',
186         'cast_net',
187         'cast_receiver',
188         'cast_test_utility',
189         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
190         '<(DEPTH)/net/net.gyp:net_test_support',
191         '<(DEPTH)/media/media.gyp:media',
192         '<(DEPTH)/testing/gtest.gyp:gtest',
193         '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
194       ],
195       'sources': [
196         '<(DEPTH)/media/cast/test/receiver.cc',
197       ],
198       'conditions': [
199         ['OS == "linux" and use_x11==1', {
200           'dependencies': [
201             '<(DEPTH)/build/linux/system.gyp:x11',
202             '<(DEPTH)/build/linux/system.gyp:xext',
203           ],
204           'sources': [
205             '<(DEPTH)/media/cast/test/linux_output_window.cc',
206             '<(DEPTH)/media/cast/test/linux_output_window.h',
207           ],
208         }],
209       ],
210     },
211     {
212       'target_name': 'cast_sender_app',
213       'type': 'executable',
214       'include_dirs': [
215         '<(DEPTH)/',
216       ],
217       'dependencies': [
218         'cast_base',
219         'cast_net',
220         'cast_sender',
221         'cast_test_utility',
222         '<(DEPTH)/net/net.gyp:net_test_support',
223         '<(DEPTH)/media/media.gyp:media',
224         '<(DEPTH)/testing/gtest.gyp:gtest',
225         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
226         '<(DEPTH)/third_party/opus/opus.gyp:opus',
227         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
228       ],
229       'sources': [
230         '<(DEPTH)/media/cast/test/sender.cc',
231       ],
232     },
233     {
234       'target_name': 'cast_simulator',
235       'type': 'executable',
236       'include_dirs': [
237         '<(DEPTH)/',
238       ],
239       'dependencies': [
240         'cast_base',
241         'cast_net',
242         'cast_network_model_proto',
243         'cast_sender',
244         'cast_test_utility',
245         '<(DEPTH)/net/net.gyp:net_test_support',
246         '<(DEPTH)/media/media.gyp:media',
247         '<(DEPTH)/testing/gtest.gyp:gtest',
248         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
249         '<(DEPTH)/third_party/opus/opus.gyp:opus',
250         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
251       ],
252       'sources': [
253         '<(DEPTH)/media/cast/test/simulator.cc',
254       ],
255     },
256     {
257       # GN version: //media/cast/test/proto
258       'target_name': 'cast_network_model_proto',
259       'type': 'static_library',
260       'include_dirs': [
261         '<(DEPTH)/',
262       ],
263       'sources': [
264         'test/proto/network_simulation_model.proto',
265       ],
266       'variables': {
267         'proto_in_dir': 'test/proto',
268         'proto_out_dir': 'media/cast/test/proto',
269       },
270       'includes': ['../../build/protoc.gypi'],
271     },
272     {
273       # GN version: //media/cast:generate_barcode_video
274       'target_name': 'generate_barcode_video',
275       'type': 'executable',
276       'include_dirs': [
277         '<(DEPTH)/',
278       ],
279       'dependencies': [
280         'cast_test_utility',
281         '<(DEPTH)/base/base.gyp:base',
282         '<(DEPTH)/media/media.gyp:media',
283       ],
284       'sources': [
285         'test/utility/generate_barcode_video.cc',
286       ],
287     },
288     {
289       # GN version: //media/cast:generate_timecode_audio
290       'target_name': 'generate_timecode_audio',
291       'type': 'executable',
292       'include_dirs': [
293         '<(DEPTH)/',
294       ],
295       'dependencies': [
296         'cast_base',
297         'cast_net',
298         'cast_test_utility',
299         '<(DEPTH)/base/base.gyp:base',
300         '<(DEPTH)/media/media.gyp:media',
301       ],
302       'sources': [
303         'test/utility/generate_timecode_audio.cc',
304       ],
305     },
306     {
307       # GN version: //media/cast:udp_proxy
308       'target_name': 'udp_proxy',
309       'type': 'executable',
310       'include_dirs': [
311         '<(DEPTH)/',
312       ],
313       'dependencies': [
314         'cast_test_utility',
315         '<(DEPTH)/base/base.gyp:base',
316         '<(DEPTH)/media/media.gyp:media',
317       ],
318       'sources': [
319         'test/utility/udp_proxy_main.cc',
320       ],
321     },
322   ], # targets
324   'conditions': [
325     ['OS=="linux"',
326       { 'targets': [
327           {
328             'target_name': 'tap_proxy',
329             'type': 'executable',
330             'include_dirs': [
331               '<(DEPTH)/',
332             ],
333             'dependencies': [
334               'cast_test_utility',
335               '<(DEPTH)/base/base.gyp:base',
336               '<(DEPTH)/media/media.gyp:media',
337             ],
338             'sources': [
339               'test/utility/tap_proxy.cc',
340             ],
341           }
342         ]
343       }
344     ],
345     ['OS=="ios" or OS=="mac"', {
346       'targets': [
347         {
348           # GN version: //media/cast:cast_h264_vt_encoder_unittests
349           'target_name': 'cast_h264_vt_encoder_unittests',
350           'type': '<(gtest_target_type)',
351           'include_dirs': [
352             '<(DEPTH)/',
353           ],
354           'dependencies': [
355             'cast_base',
356             'cast_sender',
357             'cast_test_utility',
358             '<(DEPTH)/base/base.gyp:test_support_base',
359             '<(DEPTH)/testing/gmock.gyp:gmock',
360             '<(DEPTH)/testing/gtest.gyp:gtest',
361             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
362           ],
363           'sources': [
364             'sender/h264_vt_encoder_unittest.cc',
365           ],
366       }], # targets
367     }], # OS=="ios" or OS=="mac"
368     ['test_isolation_mode != "noop"', {
369       'targets': [
370         {
371           'target_name': 'cast_unittests_run',
372           'type': 'none',
373           'dependencies': [
374             'cast_unittests',
375           ],
376           'includes': [
377             '../../build/isolate.gypi',
378           ],
379           'sources': [
380             'cast_unittests.isolate',
381           ],
382           'conditions': [
383             ['use_x11==1',
384               {
385                 'dependencies': [
386                   '../../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
387                 ],
388               }
389             ],
390           ],
391         },
392       ],
393     }],
394   ], # conditions