blob: c80714a4a9d3fb11dae6203e622894bb43089f8c [file] [log] [blame]
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +00001# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9# TODO(andrew): consider moving test_support to src/base/test.
10{
11 'includes': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000012 '../build/common.gypi',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000013 ],
14 'targets': [
15 {
Niels Möller739fcb92016-02-29 13:11:45 +010016 'target_name': 'video_test_common',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000017 'type': 'static_library',
18 'sources': [
Peter Boström13f61df2016-01-04 22:36:38 +010019 'fake_texture_frame.cc',
20 'fake_texture_frame.h',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000021 'frame_generator.cc',
22 'frame_generator.h',
Niels Möller739fcb92016-02-29 13:11:45 +010023 'frame_utils.cc',
24 'frame_utils.h',
pbos@webrtc.org724947b2013-12-11 16:26:16 +000025 ],
26 'dependencies': [
27 '<(webrtc_root)/common_video/common_video.gyp:common_video',
28 ],
29 },
30 {
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000031 'target_name': 'rtp_test_utils',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000032 'type': 'static_library',
33 'sources': [
34 'rtcp_packet_parser.cc',
35 'rtcp_packet_parser.h',
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000036 'rtp_file_reader.cc',
37 'rtp_file_reader.h',
henrik.lundin@webrtc.org83317142014-12-01 11:25:04 +000038 'rtp_file_writer.cc',
39 'rtp_file_writer.h',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000040 ],
41 'dependencies': [
asapersson@webrtc.org37c05592015-01-28 13:58:27 +000042 '<(DEPTH)/testing/gtest.gyp:gtest',
kjellanderf6b55092016-02-07 23:04:26 -080043 '<(webrtc_root)/common.gyp:webrtc_common',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000044 '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
45 ],
46 },
47 {
andresp@webrtc.org60015d22014-05-16 09:39:51 +000048 'target_name': 'field_trial',
49 'type': 'static_library',
50 'sources': [
51 'field_trial.cc',
52 'field_trial.h',
53 ],
54 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000055 '<(webrtc_root)/common.gyp:webrtc_common',
phoglund37ebcf02016-01-08 05:04:57 -080056 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000057 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andresp@webrtc.org60015d22014-05-16 09:39:51 +000058 ],
59 },
60 {
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000061 'target_name': 'test_main',
62 'type': 'static_library',
63 'sources': [
64 'test_main.cc',
65 ],
66 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +000067 'field_trial',
Peter Boström95192fb2015-10-29 12:41:56 +010068 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +000069 '<(DEPTH)/testing/gtest.gyp:gtest',
70 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
asapersson01d70a32016-05-20 06:29:46 -070071 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000072 ],
73 },
74 {
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000075 'target_name': 'test_support',
76 'type': 'static_library',
77 'dependencies': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000078 '<(DEPTH)/testing/gtest.gyp:gtest',
79 '<(DEPTH)/testing/gmock.gyp:gmock',
kjellander988d31e2016-02-05 00:23:50 -080080 '<(webrtc_root)/base/base.gyp:gtest_prod',
kwiberg77eab702016-09-28 17:42:01 -070081 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kjellanderd8dd1902016-08-23 04:52:11 -070082 '<(webrtc_root)/common_video/common_video.gyp:common_video',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000083 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
nisse115bd152016-09-30 04:14:07 -070084 'video_test_common',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000085 ],
86 'sources': [
kwiberg77eab702016-09-28 17:42:01 -070087 'gmock.h',
88 'gtest.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000089 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000090 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000091 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000092 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000093 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000094 'testsupport/frame_writer.h',
henrika1d34fe92015-06-16 10:04:20 +020095 'testsupport/iosfileutils.mm',
kjellanderd8dd1902016-08-23 04:52:11 -070096 'testsupport/metrics/video_metrics.h',
97 'testsupport/metrics/video_metrics.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000098 'testsupport/mock/mock_frame_reader.h',
99 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000100 'testsupport/packet_reader.cc',
101 'testsupport/packet_reader.h',
102 'testsupport/perf_test.cc',
103 'testsupport/perf_test.h',
andrew@webrtc.orgb87cc852013-03-25 16:23:37 +0000104 'testsupport/trace_to_stderr.cc',
105 'testsupport/trace_to_stderr.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000106 ],
henrika1d34fe92015-06-16 10:04:20 +0200107 'conditions': [
108 ['OS=="ios"', {
109 'xcode_settings': {
110 'CLANG_ENABLE_OBJC_ARC': 'YES',
111 },
112 }],
Henrik Kjellander9589e2a2015-10-22 06:48:21 +0200113 ['use_x11==1', {
114 'dependencies': [
115 '<(DEPTH)/tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
116 ],
117 }],
henrika1d34fe92015-06-16 10:04:20 +0200118 ],
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000119 },
120 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000121 # Depend on this target when you want to have test_support but also the
122 # main method needed for gtest to execute!
123 'target_name': 'test_support_main',
124 'type': 'static_library',
125 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000126 'field_trial',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000127 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000128 '<(DEPTH)/testing/gmock.gyp:gmock',
129 '<(DEPTH)/testing/gtest.gyp:gtest',
130 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
asapersson01d70a32016-05-20 06:29:46 -0700131 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000132 ],
133 'sources': [
134 'run_all_unittests.cc',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000135 'test_suite.cc',
136 'test_suite.h',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000137 ],
138 },
139 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +0000140 # Depend on this target when you want to have test_support and a special
141 # main for mac which will run your test on a worker thread and consume
142 # events on the main thread. Useful if you want to access a webcam.
143 # This main will provide all the scaffolding and objective-c black magic
144 # for you. All you need to do is to implement a function in the
145 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
146 'target_name': 'test_support_main_threaded_mac',
147 'type': 'static_library',
148 'dependencies': [
149 'test_support',
150 ],
151 'sources': [
152 'testsupport/mac/run_threaded_main_mac.h',
153 'testsupport/mac/run_threaded_main_mac.mm',
154 ],
155 },
156 {
kjellander0e739342016-03-02 10:46:17 -0800157 'target_name': 'test_common',
158 'type': 'static_library',
159 'sources': [
160 'call_test.cc',
161 'call_test.h',
162 'configurable_frame_size_encoder.cc',
163 'configurable_frame_size_encoder.h',
164 'constants.cc',
165 'constants.h',
166 'direct_transport.cc',
167 'direct_transport.h',
168 'drifting_clock.cc',
169 'drifting_clock.h',
170 'encoder_settings.cc',
171 'encoder_settings.h',
172 'fake_audio_device.cc',
173 'fake_audio_device.h',
174 'fake_decoder.cc',
175 'fake_decoder.h',
176 'fake_encoder.cc',
177 'fake_encoder.h',
178 'fake_network_pipe.cc',
179 'fake_network_pipe.h',
sakal55d932b2016-09-30 06:19:08 -0700180 'fake_videorenderer.h',
kjellander0e739342016-03-02 10:46:17 -0800181 'frame_generator_capturer.cc',
182 'frame_generator_capturer.h',
183 'layer_filtering_transport.cc',
184 'layer_filtering_transport.h',
185 'mock_transport.h',
186 'mock_voe_channel_proxy.h',
187 'mock_voice_engine.h',
188 'null_transport.cc',
189 'null_transport.h',
190 'rtp_rtcp_observer.h',
kjellander0e739342016-03-02 10:46:17 -0800191 'statistics.cc',
192 'statistics.h',
193 'vcm_capturer.cc',
194 'vcm_capturer.h',
kjellander0e739342016-03-02 10:46:17 -0800195 'video_capturer.h',
196 'win/run_loop_win.cc',
197 ],
198 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700199 ['OS!="win"', {
200 'sources': [
201 'run_loop.h',
202 'run_loop.cc',
kjellander0e739342016-03-02 10:46:17 -0800203 ],
204 }],
205 ],
206 'dependencies': [
207 '<(DEPTH)/testing/gmock.gyp:gmock',
208 '<(DEPTH)/testing/gtest.gyp:gtest',
209 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
nisse037ee922016-04-25 01:39:19 -0700210 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
kjellander0e739342016-03-02 10:46:17 -0800211 '<(webrtc_root)/common.gyp:webrtc_common',
212 '<(webrtc_root)/modules/modules.gyp:media_file',
kjellander0e739342016-03-02 10:46:17 -0800213 '<(webrtc_root)/webrtc.gyp:webrtc',
214 'rtp_test_utils',
215 'test_support',
kjellander0e739342016-03-02 10:46:17 -0800216 ],
217 },
218 {
219 'target_name': 'test_renderer',
220 'type': 'static_library',
221 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800222 'linux/glx_renderer.cc',
223 'linux/glx_renderer.h',
224 'linux/video_renderer_linux.cc',
225 'mac/video_renderer_mac.h',
226 'mac/video_renderer_mac.mm',
kjellander0e739342016-03-02 10:46:17 -0800227 'video_renderer.cc',
228 'video_renderer.h',
229 'win/d3d_renderer.cc',
230 'win/d3d_renderer.h',
231 ],
232 'conditions': [
kjellander0f380d82016-06-01 04:48:26 -0700233 ['OS!="linux" and OS!="mac" and OS!="win"', {
234 'sources': [
kjellander0e739342016-03-02 10:46:17 -0800235 'null_platform_renderer.cc',
236 ],
237 }],
kjellander0f380d82016-06-01 04:48:26 -0700238 ['OS=="linux" or OS=="mac"', {
239 'sources' : [
kjellander0e739342016-03-02 10:46:17 -0800240 'gl/gl_renderer.cc',
241 'gl/gl_renderer.h',
242 ],
243 }],
244 ['OS=="win"', {
kjellander0e739342016-03-02 10:46:17 -0800245 'include_dirs': [
246 '<(directx_sdk_path)/Include',
247 ],
248 }],
249 ['OS=="win" and clang==1', {
250 'msvs_settings': {
251 'VCCLCompilerTool': {
252 'AdditionalOptions': [
253 # Disable warnings failing when compiling with Clang on Windows.
254 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
255 '-Wno-bool-conversion',
256 '-Wno-comment',
257 '-Wno-delete-non-virtual-dtor',
258 ],
259 },
260 },
261 }],
262 ],
263 'dependencies': [
264 '<(DEPTH)/testing/gtest.gyp:gtest',
265 '<(webrtc_root)/modules/modules.gyp:media_file',
266 'test_support',
267 'video_test_common',
268 ],
269 'direct_dependent_settings': {
270 'conditions': [
271 ['OS=="linux"', {
272 'libraries': [
273 '-lXext',
274 '-lX11',
275 '-lGL',
276 ],
277 }],
278 ['OS=="android"', {
279 'libraries' : [
280 '-lGLESv2', '-llog',
281 ],
282 }],
283 ['OS=="mac"', {
284 'xcode_settings' : {
285 'OTHER_LDFLAGS' : [
286 '-framework Cocoa',
287 '-framework OpenGL',
288 '-framework CoreVideo',
289 ],
290 },
291 }],
292 ],
293 },
294 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000295 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000296}