Update ResourceConstraints::ConfigureDefaults invocation
[chromium-blink-merge.git] / media / cast / cast_testing.gypi
blobfbc4d47ff267ac5675c7516bdb8c777f480da85b
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)/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/logging_impl_unittest.cc',
79         'logging/logging_raw_unittest.cc',
80         'logging/receiver_time_offset_estimator_impl_unittest.cc',
81         'logging/serialize_deserialize_test.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/mock_cast_transport_sender.cc',
87         'net/mock_cast_transport_sender.h',
88         'net/pacing/mock_paced_packet_sender.cc',
89         'net/pacing/mock_paced_packet_sender.h',
90         'net/pacing/paced_sender_unittest.cc',
91         'net/rtcp/receiver_rtcp_event_subscriber_unittest.cc',
92         'net/rtcp/rtcp_builder_unittest.cc',
93         'net/rtcp/rtcp_unittest.cc',
94         'net/rtcp/rtcp_utility_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_packetizer_unittest.cc',
109         'net/rtp/rtp_parser_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/fake_video_encode_accelerator_factory.cc',
119         'sender/fake_video_encode_accelerator_factory.h',
120         'sender/video_encoder_unittest.cc',
121         'sender/video_sender_unittest.cc',
122         'test/end2end_unittest.cc',
123         'test/fake_receiver_time_offset_estimator.cc',
124         'test/fake_receiver_time_offset_estimator.h',
125         'test/fake_single_thread_task_runner.cc',
126         'test/fake_single_thread_task_runner.h',
127         'test/utility/audio_utility_unittest.cc',
128         'test/utility/barcode_unittest.cc',
129       ], # source
130     },
131     {
132       'target_name': 'cast_benchmarks',
133       'type': '<(gtest_target_type)',
134       'include_dirs': [
135         '<(DEPTH)/',
136       ],
137       'dependencies': [
138         'cast_base',
139         'cast_net',
140         'cast_receiver',
141         'cast_sender',
142         'cast_test_utility',
143         '<(DEPTH)/base/base.gyp:test_support_base',
144         '<(DEPTH)/net/net.gyp:net',
145         '<(DEPTH)/testing/gtest.gyp:gtest',
146       ],
147       'sources': [
148         'test/cast_benchmarks.cc',
149         'test/fake_single_thread_task_runner.cc',
150         'test/fake_single_thread_task_runner.h',
151         'test/utility/test_util.cc',
152         'test/utility/test_util.h',
153       ], # source
154       'conditions': [
155         ['os_posix==1 and OS!="mac" and OS!="ios" and use_allocator!="none"',
156           {
157             'dependencies': [
158               '<(DEPTH)/base/allocator/allocator.gyp:allocator',
159             ],
160           }
161         ],
162       ],
163     },
164     {
165       # This is a target for the collection of cast development tools.
166       # They are built on bots but not shipped.
167       'target_name': 'cast_tools',
168       'type': 'none',
169       'dependencies': [
170         'cast_receiver_app',
171         'cast_sender_app',
172         'cast_simulator',
173         'udp_proxy',
174       ],
175     },
176     {
177       'target_name': 'cast_receiver_app',
178       'type': 'executable',
179       'include_dirs': [
180         '<(DEPTH)/',
181       ],
182       'dependencies': [
183         'cast_base',
184         'cast_net',
185         'cast_receiver',
186         'cast_test_utility',
187         '<(DEPTH)/net/net.gyp:net_test_support',
188         '<(DEPTH)/media/media.gyp:media',
189         '<(DEPTH)/testing/gtest.gyp:gtest',
190         '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
191       ],
192       'sources': [
193         '<(DEPTH)/media/cast/test/receiver.cc',
194       ],
195       'conditions': [
196         ['OS == "linux" and use_x11==1', {
197           'dependencies': [
198             '<(DEPTH)/build/linux/system.gyp:x11',
199             '<(DEPTH)/build/linux/system.gyp:xext',
200           ],
201           'sources': [
202             '<(DEPTH)/media/cast/test/linux_output_window.cc',
203             '<(DEPTH)/media/cast/test/linux_output_window.h',
204             '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
205           ],
206         }],
207       ],
208     },
209     {
210       'target_name': 'cast_sender_app',
211       'type': 'executable',
212       'include_dirs': [
213         '<(DEPTH)/',
214       ],
215       'dependencies': [
216         'cast_base',
217         'cast_net',
218         'cast_sender',
219         'cast_test_utility',
220         '<(DEPTH)/net/net.gyp:net_test_support',
221         '<(DEPTH)/media/media.gyp:media',
222         '<(DEPTH)/testing/gtest.gyp:gtest',
223         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
224         '<(DEPTH)/third_party/opus/opus.gyp:opus',
225         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
226       ],
227       'sources': [
228         '<(DEPTH)/media/cast/test/sender.cc',
229       ],
230     },
231     {
232       'target_name': 'cast_simulator',
233       'type': 'executable',
234       'include_dirs': [
235         '<(DEPTH)/',
236       ],
237       'dependencies': [
238         'cast_base',
239         'cast_net',
240         'cast_network_model_proto',
241         'cast_sender',
242         'cast_test_utility',
243         '<(DEPTH)/net/net.gyp:net_test_support',
244         '<(DEPTH)/media/media.gyp:media',
245         '<(DEPTH)/testing/gtest.gyp:gtest',
246         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
247         '<(DEPTH)/third_party/opus/opus.gyp:opus',
248         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
249       ],
250       'sources': [
251         '<(DEPTH)/media/cast/test/simulator.cc',
252       ],
253     },
254     {
255       # GN version: //media/cast/test/proto
256       'target_name': 'cast_network_model_proto',
257       'type': 'static_library',
258       'include_dirs': [
259         '<(DEPTH)/',
260       ],
261       'sources': [
262         'test/proto/network_simulation_model.proto',
263       ],
264       'variables': {
265         'proto_in_dir': 'test/proto',
266         'proto_out_dir': 'media/cast/test/proto',
267       },
268       'includes': ['../../build/protoc.gypi'],
269     },
270     {
271       # GN version: //media/cast:generate_barcode_video
272       'target_name': 'generate_barcode_video',
273       'type': 'executable',
274       'include_dirs': [
275         '<(DEPTH)/',
276       ],
277       'dependencies': [
278         'cast_test_utility',
279         '<(DEPTH)/base/base.gyp:base',
280         '<(DEPTH)/media/media.gyp:media',
281       ],
282       'sources': [
283         'test/utility/generate_barcode_video.cc',
284       ],
285     },
286     {
287       # GN version: //media/cast:generate_timecode_audio
288       'target_name': 'generate_timecode_audio',
289       'type': 'executable',
290       'include_dirs': [
291         '<(DEPTH)/',
292       ],
293       'dependencies': [
294         'cast_base',
295         'cast_net',
296         'cast_test_utility',
297         '<(DEPTH)/base/base.gyp:base',
298         '<(DEPTH)/media/media.gyp:media',
299       ],
300       'sources': [
301         'test/utility/generate_timecode_audio.cc',
302       ],
303     },
304     {
305       # GN version: //media/cast:udp_proxy
306       'target_name': 'udp_proxy',
307       'type': 'executable',
308       'include_dirs': [
309         '<(DEPTH)/',
310       ],
311       'dependencies': [
312         'cast_test_utility',
313         '<(DEPTH)/base/base.gyp:base',
314         '<(DEPTH)/media/media.gyp:media',
315       ],
316       'sources': [
317         'test/utility/udp_proxy_main.cc',
318       ],
319     },
320   ], # targets
322   'conditions': [
323     ['OS=="linux"',
324       { 'targets': [
325           {
326             'target_name': 'tap_proxy',
327             'type': 'executable',
328             'include_dirs': [
329               '<(DEPTH)/',
330             ],
331             'dependencies': [
332               'cast_test_utility',
333               '<(DEPTH)/base/base.gyp:base',
334               '<(DEPTH)/media/media.gyp:media',
335             ],
336             'sources': [
337               'test/utility/tap_proxy.cc',
338             ],
339           }
340         ]
341       }
342     ],
343     ['OS=="ios" or OS=="mac"', {
344       'targets': [
345         {
346           # GN version: //media/cast:cast_h264_vt_encoder_unittests
347           'target_name': 'cast_h264_vt_encoder_unittests',
348           'type': '<(gtest_target_type)',
349           'include_dirs': [
350             '<(DEPTH)/',
351           ],
352           'dependencies': [
353             'cast_base',
354             'cast_sender',
355             'cast_test_utility',
356             '<(DEPTH)/base/base.gyp:test_support_base',
357             '<(DEPTH)/testing/gmock.gyp:gmock',
358             '<(DEPTH)/testing/gtest.gyp:gtest',
359             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
360           ],
361           'sources': [
362             'sender/h264_vt_encoder_unittest.cc',
363           ],
364       }], # targets
365     }], # OS=="ios" or OS=="mac"
366     ['test_isolation_mode != "noop"', {
367       'targets': [
368         {
369           'target_name': 'cast_unittests_run',
370           'type': 'none',
371           'dependencies': [
372             'cast_unittests',
373           ],
374           'includes': [
375             '../../build/isolate.gypi',
376           ],
377           'sources': [
378             'cast_unittests.isolate',
379           ],
380         },
381       ],
382     }],
383   ], # conditions