blob: 0fe92314eff00fd5bc6ee4e2dcee5d36764b9c58 [file] [log] [blame]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +00001# Copyright (c) 2014 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
kjellanderbac04122016-06-02 02:18:48 -07009import("//testing/test.gni")
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000010import("../build/webrtc.gni")
11
12source_set("tools") {
13 deps = [
14 ":command_line_parser",
15 ]
kjellandera8119682016-06-06 02:00:18 -070016
17 if (!build_with_chromium) {
18 # TODO(kjellander): Enable these when webrtc:5970 is fixed.
19 deps += [
20 ":frame_analyzer",
21 ":rgba_to_i420_converter",
22 ]
23 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000024}
25
26source_set("command_line_parser") {
27 sources = [
Henrik Kjellanderfa16dda2015-04-01 22:53:56 +020028 "simple_command_line_parser.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020029 "simple_command_line_parser.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000030 ]
Henrik Kjellander67bcb602015-10-07 08:42:52 +020031 deps = [
kjellander988d31e2016-02-05 00:23:50 -080032 "../base:gtest_prod",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020033 ]
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +000034 configs += [ "..:common_config" ]
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020035 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000036}
37
Henrik Kjellander67bcb602015-10-07 08:42:52 +020038source_set("video_quality_analysis") {
39 sources = [
40 "frame_analyzer/video_quality_analysis.cc",
41 "frame_analyzer/video_quality_analysis.h",
42 ]
kjellanderbac04122016-06-02 02:18:48 -070043
44 configs += [ "..:common_config" ]
45 public_configs = [ "..:common_inherited_config" ]
46
Henrik Kjellander67bcb602015-10-07 08:42:52 +020047 deps = [
48 "../common_video",
49 ]
50 public_deps = [
51 "../common_video",
52 ]
53}
54
55executable("frame_analyzer") {
56 sources = [
57 "frame_analyzer/frame_analyzer.cc",
58 ]
kjellanderbac04122016-06-02 02:18:48 -070059
60 configs += [ "..:common_config" ]
61 public_configs = [ "..:common_inherited_config" ]
62
63 deps = [
64 ":command_line_parser",
65 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070066 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -070067 "//build/win:default_exe_manifest",
68 ]
69}
70
71executable("psnr_ssim_analyzer") {
72 sources = [
73 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
74 ]
75
76 configs += [ "..:common_config" ]
77 public_configs = [ "..:common_inherited_config" ]
78
Henrik Kjellander67bcb602015-10-07 08:42:52 +020079 deps = [
80 ":command_line_parser",
81 ":video_quality_analysis",
ehmaldonadobcba64a2016-08-19 02:11:07 -070082 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -070083 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020084 ]
85}
86
87executable("rgba_to_i420_converter") {
88 sources = [
89 "converter/converter.cc",
90 "converter/converter.h",
91 "converter/rgba_to_i420_converter.cc",
92 ]
kjellanderbac04122016-06-02 02:18:48 -070093
94 configs += [ "..:common_config" ]
95 public_configs = [ "..:common_inherited_config" ]
96
Henrik Kjellander67bcb602015-10-07 08:42:52 +020097 deps = [
98 ":command_line_parser",
99 "../common_video",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700100 "//build/config/sanitizers:deps",
brucedawson84583e02016-04-28 00:21:08 -0700101 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +0200102 ]
103}
104
kjellanderbac04122016-06-02 02:18:48 -0700105source_set("frame_editing_lib") {
106 sources = [
107 "frame_editing/frame_editing_lib.cc",
108 "frame_editing/frame_editing_lib.h",
109 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000110
kjellanderbac04122016-06-02 02:18:48 -0700111 configs += [ "..:common_config" ]
112 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000113
kjellanderbac04122016-06-02 02:18:48 -0700114 # TODO(jschuh): Bug 1348: fix this warning.
115 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000116
kjellanderbac04122016-06-02 02:18:48 -0700117 if (is_clang) {
118 # Suppress warnings from the Chromium Clang plugin.
119 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
120 configs -= [ "//build/config/clang:find_bad_constructs" ]
121 }
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +0000122
kjellanderbac04122016-06-02 02:18:48 -0700123 deps = [
124 "../common_video",
125 ]
126}
127
128executable("frame_editor") {
129 sources = [
130 "frame_editing/frame_editing.cc",
131 ]
132
133 configs += [ "..:common_config" ]
134 public_configs = [ "..:common_inherited_config" ]
135
136 deps = [
137 ":command_line_parser",
138 ":frame_editing_lib",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700139 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700140 "//build/win:default_exe_manifest",
141 ]
142}
143
144executable("force_mic_volume_max") {
145 sources = [
146 "force_mic_volume_max/force_mic_volume_max.cc",
147 ]
148
149 configs += [ "..:common_config" ]
150 public_configs = [ "..:common_inherited_config" ]
151
152 if (is_clang) {
153 # Suppress warnings from the Chromium Clang plugin.
154 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
155 configs -= [ "//build/config/clang:find_bad_constructs" ]
156 }
157
158 deps = [
159 "../system_wrappers:system_wrappers_default",
160 "../voice_engine",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700161 "//build/config/sanitizers:deps",
kjellanderbac04122016-06-02 02:18:48 -0700162 "//build/win:default_exe_manifest",
163 ]
164}
165
166source_set("agc_test_utils") {
167 testonly = true
168 sources = [
169 "agc/test_utils.cc",
170 "agc/test_utils.h",
171 ]
172
173 configs += [ "..:common_config" ]
174 public_configs = [ "..:common_inherited_config" ]
175}
176
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200177# Exclude tools depending on gflags since that's not available in Chromium.
kjellander@webrtc.orgaff499c2016-06-06 23:04:31 +0200178if (rtc_include_tests) {
terelius54ce6802016-07-13 06:44:41 -0700179 if (rtc_enable_protobuf) {
180 executable("event_log_visualizer") {
Stefan Holmer13181032016-07-29 14:48:54 +0200181 testonly = true
terelius54ce6802016-07-13 06:44:41 -0700182 sources = [
183 "event_log_visualizer/analyzer.cc",
184 "event_log_visualizer/analyzer.h",
tereliusd49a37b2016-08-10 07:12:38 -0700185 "event_log_visualizer/main.cc",
tereliusdc35dcd2016-08-01 12:03:27 -0700186 "event_log_visualizer/plot_base.cc",
terelius54ce6802016-07-13 06:44:41 -0700187 "event_log_visualizer/plot_base.h",
188 "event_log_visualizer/plot_python.cc",
189 "event_log_visualizer/plot_python.h",
190 ]
191
192 configs += [ "..:common_config" ]
193 public_configs = [ "..:common_inherited_config" ]
194
195 if (is_clang && !is_nacl) {
196 # Suppress warnings from the Chromium Clang plugin.
197 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
198 configs -= [ "//build/config/clang:find_bad_constructs" ]
199 }
200
201 defines = [ "ENABLE_RTC_EVENT_LOG" ]
202 deps = [
Stefan Holmer13181032016-07-29 14:48:54 +0200203 "../:rtc_event_log",
terelius54ce6802016-07-13 06:44:41 -0700204 "../:rtc_event_log_parser",
Stefan Holmer13181032016-07-29 14:48:54 +0200205 "../modules/congestion_controller:congestion_controller",
terelius54ce6802016-07-13 06:44:41 -0700206 "../modules/rtp_rtcp:rtp_rtcp",
207 "../system_wrappers:system_wrappers_default",
Stefan Holmer13181032016-07-29 14:48:54 +0200208 "../test:field_trial",
ehmaldonadobcba64a2016-08-19 02:11:07 -0700209 "//build/config/sanitizers:deps",
terelius54ce6802016-07-13 06:44:41 -0700210 "//third_party/gflags",
211 ]
212 }
213 }
214
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200215 executable("agc_harness") {
216 testonly = true
217 sources = [
218 "agc/agc_harness.cc",
219 ]
kjellanderbac04122016-06-02 02:18:48 -0700220
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200221 configs += [ "..:common_config" ]
222 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700223
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200224 if (is_clang) {
225 # Suppress warnings from the Chromium Clang plugin.
226 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
227 configs -= [ "//build/config/clang:find_bad_constructs" ]
228 }
229
230 deps = [
231 "../system_wrappers:system_wrappers_default",
232 "../test:channel_transport",
233 "../test:test_support",
234 "../voice_engine",
235 "//build/win:default_exe_manifest",
236 "//testing/gtest",
237 "//third_party/gflags",
238 ]
kjellanderbac04122016-06-02 02:18:48 -0700239 }
240
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200241 executable("activity_metric") {
242 testonly = true
243 sources = [
244 "agc/activity_metric.cc",
245 ]
kjellanderbac04122016-06-02 02:18:48 -0700246
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200247 configs += [ "..:common_config" ]
248 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700249
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200250 if (is_clang) {
251 # Suppress warnings from the Chromium Clang plugin.
252 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
253 configs -= [ "//build/config/clang:find_bad_constructs" ]
254 }
kjellanderbac04122016-06-02 02:18:48 -0700255
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200256 deps = [
257 "../modules/audio_processing",
258 "../system_wrappers:metrics_default",
259 "//build/win:default_exe_manifest",
260 "//testing/gtest",
261 "//third_party/gflags",
262 ]
kjellanderbac04122016-06-02 02:18:48 -0700263 }
264
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200265 executable("audio_e2e_harness") {
266 testonly = true
267 sources = [
268 "e2e_quality/audio/audio_e2e_harness.cc",
269 ]
kjellanderbac04122016-06-02 02:18:48 -0700270
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200271 configs += [ "..:common_config" ]
272 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700273
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200274 if (is_clang) {
275 # Suppress warnings from the Chromium Clang plugin.
276 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
277 configs -= [ "//build/config/clang:find_bad_constructs" ]
278 }
kjellanderbac04122016-06-02 02:18:48 -0700279
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200280 deps = [
281 "../system_wrappers:system_wrappers_default",
282 "../test:channel_transport",
283 "../voice_engine",
284 "//build/win:default_exe_manifest",
285 "//testing/gtest",
286 "//third_party/gflags",
287 ]
kjellanderbac04122016-06-02 02:18:48 -0700288 }
289
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200290 test("tools_unittests") {
291 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700292
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200293 sources = [
294 "frame_analyzer/video_quality_analysis_unittest.cc",
295 "frame_editing/frame_editing_unittest.cc",
296 "simple_command_line_parser_unittest.cc",
297 ]
kjellanderbac04122016-06-02 02:18:48 -0700298
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200299 configs += [ "..:common_config" ]
300 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700301
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200302 # TODO(jschuh): Bug 1348: fix this warning.
303 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700304
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200305 if (is_clang) {
306 # Suppress warnings from the Chromium Clang plugin.
307 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
308 configs -= [ "//build/config/clang:find_bad_constructs" ]
309 }
kjellanderbac04122016-06-02 02:18:48 -0700310
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200311 deps = [
312 ":command_line_parser",
313 ":frame_editing_lib",
314 ":video_quality_analysis",
315 "../test:test_support_main",
316 "//testing/gtest",
317 ]
kjellanderbac04122016-06-02 02:18:48 -0700318
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200319 if (is_android) {
320 deps += [ "//testing/android/native_test:native_test_support" ]
ehmaldonado4556b452016-08-10 07:47:14 -0700321
322 data = [
323 "//resources/foreman_cif.yuv",
324 ]
sakal714dd4e2016-08-15 02:29:11 -0700325
326 shard_timeout = 900
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200327 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000328 }
aleloi7ebbf902016-06-20 07:39:15 -0700329
330 if (rtc_enable_protobuf) {
331 copy("rtp_analyzer") {
332 sources = [
333 "py_event_log_analyzer/misc.py",
334 "py_event_log_analyzer/pb_parse.py",
335 "py_event_log_analyzer/rtp_analyzer.py",
336 "py_event_log_analyzer/rtp_analyzer.sh",
337 ]
338 outputs = [
339 "$root_build_dir/{{source_file_part}}",
340 ]
341 deps = [
342 "..:rtc_event_log_proto",
343 ]
344 }
345 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000346}