Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / media / cast / cast_testing.gypi
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.
4
5 {
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/skewed_single_thread_task_runner.cc',
29         'test/skewed_single_thread_task_runner.h',
30         'test/skewed_tick_clock.cc',
31         'test/skewed_tick_clock.h',
32         'test/loopback_transport.cc',
33         'test/loopback_transport.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/video_utility.cc',
49         'test/utility/video_utility.h',
50         'test/utility/udp_proxy.cc',
51         'test/utility/udp_proxy.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)/net/net.gyp:net',
72         '<(DEPTH)/testing/gmock.gyp:gmock',
73         '<(DEPTH)/testing/gtest.gyp:gtest',
74       ],
75       'sources': [
76         '<(DEPTH)/media/base/run_all_unittests.cc',
77         'logging/encoding_event_subscriber_unittest.cc',
78         'logging/serialize_deserialize_test.cc',
79         'logging/logging_impl_unittest.cc',
80         'logging/logging_raw_unittest.cc',
81         'logging/receiver_time_offset_estimator_impl_unittest.cc',
82         'logging/simple_event_subscriber_unittest.cc',
83         'logging/stats_event_subscriber_unittest.cc',
84         'net/cast_transport_sender_impl_unittest.cc',
85         'net/frame_id_wrap_helper_test.cc',
86         'net/pacing/mock_paced_packet_sender.cc',
87         'net/pacing/mock_paced_packet_sender.h',
88         'net/pacing/paced_sender_unittest.cc',
89         'net/rtcp/mock_rtcp_receiver_feedback.cc',
90         'net/rtcp/mock_rtcp_receiver_feedback.h',
91         'net/rtcp/rtcp_receiver_unittest.cc',
92         'net/rtcp/rtcp_sender_unittest.cc',
93         'net/rtcp/rtcp_unittest.cc',
94         'net/rtcp/receiver_rtcp_event_subscriber_unittest.cc',
95 # TODO(miu): The following two are test utility modules.  Rename/move the files.
96         'net/rtcp/test_rtcp_packet_builder.cc',
97         'net/rtcp/test_rtcp_packet_builder.h',
98         'net/rtp/cast_message_builder_unittest.cc',
99         'net/rtp/frame_buffer_unittest.cc',
100         'net/rtp/framer_unittest.cc',
101         'net/rtp/mock_rtp_payload_feedback.cc',
102         'net/rtp/mock_rtp_payload_feedback.h',
103         'net/rtp/packet_storage_unittest.cc',
104         'net/rtp/receiver_stats_unittest.cc',
105         'net/rtp/rtp_header_parser.cc',
106         'net/rtp/rtp_header_parser.h',
107         'net/rtp/rtp_packet_builder.cc',
108         'net/rtp/rtp_parser_unittest.cc',
109         'net/rtp/rtp_packetizer_unittest.cc',
110         'net/rtp/rtp_receiver_defines.h',
111         'net/udp_transport_unittest.cc',
112         'receiver/audio_decoder_unittest.cc',
113         'receiver/frame_receiver_unittest.cc',
114         'receiver/video_decoder_unittest.cc',
115         'sender/audio_encoder_unittest.cc',
116         'sender/audio_sender_unittest.cc',
117         'sender/congestion_control_unittest.cc',
118         'sender/external_video_encoder_unittest.cc',
119         'sender/video_encoder_impl_unittest.cc',
120         'sender/video_sender_unittest.cc',
121         'test/end2end_unittest.cc',
122         'test/fake_receiver_time_offset_estimator.cc',
123         'test/fake_receiver_time_offset_estimator.h',
124         'test/fake_single_thread_task_runner.cc',
125         'test/fake_single_thread_task_runner.h',
126         'test/fake_video_encode_accelerator.cc',
127         'test/fake_video_encode_accelerator.h',
128         'test/utility/audio_utility_unittest.cc',
129         'test/utility/barcode_unittest.cc',
130       ], # source
131     },
132     {
133       'target_name': 'cast_benchmarks',
134       'type': '<(gtest_target_type)',
135       'include_dirs': [
136         '<(DEPTH)/',
137       ],
138       'dependencies': [
139         'cast_base',
140         'cast_net',
141         'cast_receiver',
142         'cast_sender',
143         'cast_test_utility',
144         '<(DEPTH)/base/base.gyp:test_support_base',
145         '<(DEPTH)/net/net.gyp:net',
146         '<(DEPTH)/testing/gtest.gyp:gtest',
147       ],
148       'sources': [
149         'test/cast_benchmarks.cc',
150         'test/fake_single_thread_task_runner.cc',
151         'test/fake_single_thread_task_runner.h',
152         'test/fake_video_encode_accelerator.cc',
153         'test/fake_video_encode_accelerator.h',
154         'test/utility/test_util.cc',
155         'test/utility/test_util.h',
156       ], # source
157       'conditions': [
158         ['os_posix==1 and OS!="mac" and OS!="ios" and use_allocator!="none"',
159           {
160             'dependencies': [
161               '<(DEPTH)/base/allocator/allocator.gyp:allocator',
162             ],
163           }
164         ],
165       ],
166     },
167     {
168       # This is a target for the collection of cast development tools.
169       # They are built on bots but not shipped.
170       'target_name': 'cast_tools',
171       'type': 'none',
172       'dependencies': [
173         'cast_receiver_app',
174         'cast_sender_app',
175         'cast_simulator',
176         'udp_proxy',
177       ],
178     },
179     {
180       'target_name': 'cast_receiver_app',
181       'type': 'executable',
182       'include_dirs': [
183         '<(DEPTH)/',
184       ],
185       'dependencies': [
186         'cast_base',
187         'cast_net',
188         'cast_receiver',
189         'cast_test_utility',
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             '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
208           ],
209         }],
210       ],
211     },
212     {
213       'target_name': 'cast_sender_app',
214       'type': 'executable',
215       'include_dirs': [
216         '<(DEPTH)/',
217       ],
218       'dependencies': [
219         'cast_base',
220         'cast_net',
221         'cast_sender',
222         'cast_test_utility',
223         '<(DEPTH)/net/net.gyp:net_test_support',
224         '<(DEPTH)/media/media.gyp:media',
225         '<(DEPTH)/testing/gtest.gyp:gtest',
226         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
227         '<(DEPTH)/third_party/opus/opus.gyp:opus',
228         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
229       ],
230       'sources': [
231         '<(DEPTH)/media/cast/test/sender.cc',
232       ],
233     },
234     {
235       'target_name': 'cast_simulator',
236       'type': 'executable',
237       'include_dirs': [
238         '<(DEPTH)/',
239       ],
240       'dependencies': [
241         'cast_base',
242         'cast_net',
243         'cast_network_model_proto',
244         'cast_sender',
245         'cast_test_utility',
246         '<(DEPTH)/net/net.gyp:net_test_support',
247         '<(DEPTH)/media/media.gyp:media',
248         '<(DEPTH)/testing/gtest.gyp:gtest',
249         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
250         '<(DEPTH)/third_party/opus/opus.gyp:opus',
251         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
252       ],
253       'sources': [
254         '<(DEPTH)/media/cast/test/simulator.cc',
255       ],
256     },
257     {
258       # GN version: //media/cast/test/proto
259       'target_name': 'cast_network_model_proto',
260       'type': 'static_library',
261       'include_dirs': [
262         '<(DEPTH)/',
263       ],
264       'sources': [
265         'test/proto/network_simulation_model.proto',
266       ],
267       'variables': {
268         'proto_in_dir': 'test/proto',
269         'proto_out_dir': 'media/cast/test/proto',
270       },
271       'includes': ['../../build/protoc.gypi'],
272     },
273     {
274       # GN version: //media/cast:generate_barcode_video
275       'target_name': 'generate_barcode_video',
276       'type': 'executable',
277       'include_dirs': [
278         '<(DEPTH)/',
279       ],
280       'dependencies': [
281         'cast_test_utility',
282         '<(DEPTH)/base/base.gyp:base',
283         '<(DEPTH)/media/media.gyp:media',
284       ],
285       'sources': [
286         'test/utility/generate_barcode_video.cc',
287       ],
288     },
289     {
290       # GN version: //media/cast:generate_timecode_audio
291       'target_name': 'generate_timecode_audio',
292       'type': 'executable',
293       'include_dirs': [
294         '<(DEPTH)/',
295       ],
296       'dependencies': [
297         'cast_base',
298         'cast_net',
299         'cast_test_utility',
300         '<(DEPTH)/base/base.gyp:base',
301         '<(DEPTH)/media/media.gyp:media',
302       ],
303       'sources': [
304         'test/utility/generate_timecode_audio.cc',
305       ],
306     },
307     {
308       # GN version: //media/cast:udp_proxy
309       'target_name': 'udp_proxy',
310       'type': 'executable',
311       'include_dirs': [
312         '<(DEPTH)/',
313       ],
314       'dependencies': [
315         'cast_test_utility',
316         '<(DEPTH)/base/base.gyp:base',
317         '<(DEPTH)/media/media.gyp:media',
318       ],
319       'sources': [
320         'test/utility/udp_proxy_main.cc',
321       ],
322     },
323   ], # targets
324
325   'conditions': [
326     ['OS=="linux"',
327       { 'targets': [
328           {
329             'target_name': 'tap_proxy',
330             'type': 'executable',
331             'include_dirs': [
332               '<(DEPTH)/',
333             ],
334             'dependencies': [
335               'cast_test_utility',
336               '<(DEPTH)/base/base.gyp:base',
337               '<(DEPTH)/media/media.gyp:media',
338             ],
339             'sources': [
340               'test/utility/tap_proxy.cc',
341             ],
342           }
343         ]
344       }
345     ]
346   ], # targets
347 }