Adding a memory pressure observer for ChromeOS.
[chromium-blink-merge.git] / media / cast / cast_testing.gypi
blob0474eef0bd1f36ef3d33ec2594f5b8223c9f99fa
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/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/rtcp_builder_unittest.cc',
90         'net/rtcp/rtcp_unittest.cc',
91         'net/rtcp/rtcp_utility_unittest.cc',
92         'net/rtcp/receiver_rtcp_event_subscriber_unittest.cc',
93 # TODO(miu): The following two are test utility modules.  Rename/move the files.
94         'net/rtcp/test_rtcp_packet_builder.cc',
95         'net/rtcp/test_rtcp_packet_builder.h',
96         'net/rtp/cast_message_builder_unittest.cc',
97         'net/rtp/frame_buffer_unittest.cc',
98         'net/rtp/framer_unittest.cc',
99         'net/rtp/mock_rtp_payload_feedback.cc',
100         'net/rtp/mock_rtp_payload_feedback.h',
101         'net/rtp/packet_storage_unittest.cc',
102         'net/rtp/receiver_stats_unittest.cc',
103         'net/rtp/rtp_header_parser.cc',
104         'net/rtp/rtp_header_parser.h',
105         'net/rtp/rtp_packet_builder.cc',
106         'net/rtp/rtp_parser_unittest.cc',
107         'net/rtp/rtp_packetizer_unittest.cc',
108         'net/rtp/rtp_receiver_defines.h',
109         'net/udp_transport_unittest.cc',
110         'receiver/audio_decoder_unittest.cc',
111         'receiver/frame_receiver_unittest.cc',
112         'receiver/video_decoder_unittest.cc',
113         'sender/audio_encoder_unittest.cc',
114         'sender/audio_sender_unittest.cc',
115         'sender/congestion_control_unittest.cc',
116         'sender/external_video_encoder_unittest.cc',
117         'sender/video_encoder_impl_unittest.cc',
118         'sender/video_sender_unittest.cc',
119         'test/end2end_unittest.cc',
120         'test/fake_receiver_time_offset_estimator.cc',
121         'test/fake_receiver_time_offset_estimator.h',
122         'test/fake_single_thread_task_runner.cc',
123         'test/fake_single_thread_task_runner.h',
124         'test/fake_video_encode_accelerator.cc',
125         'test/fake_video_encode_accelerator.h',
126         'test/utility/audio_utility_unittest.cc',
127         'test/utility/barcode_unittest.cc',
128       ], # source
129     },
130     {
131       'target_name': 'cast_benchmarks',
132       'type': '<(gtest_target_type)',
133       'include_dirs': [
134         '<(DEPTH)/',
135       ],
136       'dependencies': [
137         'cast_base',
138         'cast_net',
139         'cast_receiver',
140         'cast_sender',
141         'cast_test_utility',
142         '<(DEPTH)/base/base.gyp:test_support_base',
143         '<(DEPTH)/net/net.gyp:net',
144         '<(DEPTH)/testing/gtest.gyp:gtest',
145       ],
146       'sources': [
147         'test/cast_benchmarks.cc',
148         'test/fake_single_thread_task_runner.cc',
149         'test/fake_single_thread_task_runner.h',
150         'test/fake_video_encode_accelerator.cc',
151         'test/fake_video_encode_accelerator.h',
152         'test/utility/test_util.cc',
153         'test/utility/test_util.h',
154       ], # source
155       'conditions': [
156         ['os_posix==1 and OS!="mac" and OS!="ios" and use_allocator!="none"',
157           {
158             'dependencies': [
159               '<(DEPTH)/base/allocator/allocator.gyp:allocator',
160             ],
161           }
162         ],
163       ],
164     },
165     {
166       # This is a target for the collection of cast development tools.
167       # They are built on bots but not shipped.
168       'target_name': 'cast_tools',
169       'type': 'none',
170       'dependencies': [
171         'cast_receiver_app',
172         'cast_sender_app',
173         'cast_simulator',
174         'udp_proxy',
175       ],
176     },
177     {
178       'target_name': 'cast_receiver_app',
179       'type': 'executable',
180       'include_dirs': [
181         '<(DEPTH)/',
182       ],
183       'dependencies': [
184         'cast_base',
185         'cast_net',
186         'cast_receiver',
187         'cast_test_utility',
188         '<(DEPTH)/net/net.gyp:net_test_support',
189         '<(DEPTH)/media/media.gyp:media',
190         '<(DEPTH)/testing/gtest.gyp:gtest',
191         '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
192       ],
193       'sources': [
194         '<(DEPTH)/media/cast/test/receiver.cc',
195       ],
196       'conditions': [
197         ['OS == "linux" and use_x11==1', {
198           'dependencies': [
199             '<(DEPTH)/build/linux/system.gyp:x11',
200             '<(DEPTH)/build/linux/system.gyp:xext',
201           ],
202           'sources': [
203             '<(DEPTH)/media/cast/test/linux_output_window.cc',
204             '<(DEPTH)/media/cast/test/linux_output_window.h',
205             '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
206           ],
207         }],
208       ],
209     },
210     {
211       'target_name': 'cast_sender_app',
212       'type': 'executable',
213       'include_dirs': [
214         '<(DEPTH)/',
215       ],
216       'dependencies': [
217         'cast_base',
218         'cast_net',
219         'cast_sender',
220         'cast_test_utility',
221         '<(DEPTH)/net/net.gyp:net_test_support',
222         '<(DEPTH)/media/media.gyp:media',
223         '<(DEPTH)/testing/gtest.gyp:gtest',
224         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
225         '<(DEPTH)/third_party/opus/opus.gyp:opus',
226         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
227       ],
228       'sources': [
229         '<(DEPTH)/media/cast/test/sender.cc',
230       ],
231     },
232     {
233       'target_name': 'cast_simulator',
234       'type': 'executable',
235       'include_dirs': [
236         '<(DEPTH)/',
237       ],
238       'dependencies': [
239         'cast_base',
240         'cast_net',
241         'cast_network_model_proto',
242         'cast_sender',
243         'cast_test_utility',
244         '<(DEPTH)/net/net.gyp:net_test_support',
245         '<(DEPTH)/media/media.gyp:media',
246         '<(DEPTH)/testing/gtest.gyp:gtest',
247         '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
248         '<(DEPTH)/third_party/opus/opus.gyp:opus',
249         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
250       ],
251       'sources': [
252         '<(DEPTH)/media/cast/test/simulator.cc',
253       ],
254     },
255     {
256       # GN version: //media/cast/test/proto
257       'target_name': 'cast_network_model_proto',
258       'type': 'static_library',
259       'include_dirs': [
260         '<(DEPTH)/',
261       ],
262       'sources': [
263         'test/proto/network_simulation_model.proto',
264       ],
265       'variables': {
266         'proto_in_dir': 'test/proto',
267         'proto_out_dir': 'media/cast/test/proto',
268       },
269       'includes': ['../../build/protoc.gypi'],
270     },
271     {
272       # GN version: //media/cast:generate_barcode_video
273       'target_name': 'generate_barcode_video',
274       'type': 'executable',
275       'include_dirs': [
276         '<(DEPTH)/',
277       ],
278       'dependencies': [
279         'cast_test_utility',
280         '<(DEPTH)/base/base.gyp:base',
281         '<(DEPTH)/media/media.gyp:media',
282       ],
283       'sources': [
284         'test/utility/generate_barcode_video.cc',
285       ],
286     },
287     {
288       # GN version: //media/cast:generate_timecode_audio
289       'target_name': 'generate_timecode_audio',
290       'type': 'executable',
291       'include_dirs': [
292         '<(DEPTH)/',
293       ],
294       'dependencies': [
295         'cast_base',
296         'cast_net',
297         'cast_test_utility',
298         '<(DEPTH)/base/base.gyp:base',
299         '<(DEPTH)/media/media.gyp:media',
300       ],
301       'sources': [
302         'test/utility/generate_timecode_audio.cc',
303       ],
304     },
305     {
306       # GN version: //media/cast:udp_proxy
307       'target_name': 'udp_proxy',
308       'type': 'executable',
309       'include_dirs': [
310         '<(DEPTH)/',
311       ],
312       'dependencies': [
313         'cast_test_utility',
314         '<(DEPTH)/base/base.gyp:base',
315         '<(DEPTH)/media/media.gyp:media',
316       ],
317       'sources': [
318         'test/utility/udp_proxy_main.cc',
319       ],
320     },
321   ], # targets
323   'conditions': [
324     ['OS=="linux"',
325       { 'targets': [
326           {
327             'target_name': 'tap_proxy',
328             'type': 'executable',
329             'include_dirs': [
330               '<(DEPTH)/',
331             ],
332             'dependencies': [
333               'cast_test_utility',
334               '<(DEPTH)/base/base.gyp:base',
335               '<(DEPTH)/media/media.gyp:media',
336             ],
337             'sources': [
338               'test/utility/tap_proxy.cc',
339             ],
340           }
341         ]
342       }
343     ],
344     ['OS=="ios" or OS=="mac"', {
345       'targets': [
346         {
347           # GN version: //media/cast:cast_h264_vt_encoder_unittests
348           'target_name': 'cast_h264_vt_encoder_unittests',
349           'type': '<(gtest_target_type)',
350           'include_dirs': [
351             '<(DEPTH)/',
352           ],
353           'dependencies': [
354             'cast_base',
355             'cast_sender',
356             'cast_test_utility',
357             '<(DEPTH)/base/base.gyp:test_support_base',
358             '<(DEPTH)/testing/gmock.gyp:gmock',
359             '<(DEPTH)/testing/gtest.gyp:gtest',
360             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
361           ],
362           'sources': [
363             'sender/h264_vt_encoder_unittest.cc',
364           ],
365       }], # targets
366     }], # OS=="ios" or OS=="mac"
367   ], # conditions