blob: 45d8051ee22a59f4946651780113001c31dd3ddc [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",
66 "//build/win:default_exe_manifest",
67 ]
68}
69
70executable("psnr_ssim_analyzer") {
71 sources = [
72 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
73 ]
74
75 configs += [ "..:common_config" ]
76 public_configs = [ "..:common_inherited_config" ]
77
Henrik Kjellander67bcb602015-10-07 08:42:52 +020078 deps = [
79 ":command_line_parser",
80 ":video_quality_analysis",
brucedawson84583e02016-04-28 00:21:08 -070081 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020082 ]
83}
84
85executable("rgba_to_i420_converter") {
86 sources = [
87 "converter/converter.cc",
88 "converter/converter.h",
89 "converter/rgba_to_i420_converter.cc",
90 ]
kjellanderbac04122016-06-02 02:18:48 -070091
92 configs += [ "..:common_config" ]
93 public_configs = [ "..:common_inherited_config" ]
94
Henrik Kjellander67bcb602015-10-07 08:42:52 +020095 deps = [
96 ":command_line_parser",
97 "../common_video",
brucedawson84583e02016-04-28 00:21:08 -070098 "//build/win:default_exe_manifest",
Henrik Kjellander67bcb602015-10-07 08:42:52 +020099 ]
100}
101
kjellanderbac04122016-06-02 02:18:48 -0700102source_set("frame_editing_lib") {
103 sources = [
104 "frame_editing/frame_editing_lib.cc",
105 "frame_editing/frame_editing_lib.h",
106 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000107
kjellanderbac04122016-06-02 02:18:48 -0700108 configs += [ "..:common_config" ]
109 public_configs = [ "..:common_inherited_config" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000110
kjellanderbac04122016-06-02 02:18:48 -0700111 # TODO(jschuh): Bug 1348: fix this warning.
112 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000113
kjellanderbac04122016-06-02 02:18:48 -0700114 if (is_clang) {
115 # Suppress warnings from the Chromium Clang plugin.
116 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
117 configs -= [ "//build/config/clang:find_bad_constructs" ]
118 }
kjellander@webrtc.org3037bc32014-09-30 19:07:58 +0000119
kjellanderbac04122016-06-02 02:18:48 -0700120 deps = [
121 "../common_video",
122 ]
123}
124
125executable("frame_editor") {
126 sources = [
127 "frame_editing/frame_editing.cc",
128 ]
129
130 configs += [ "..:common_config" ]
131 public_configs = [ "..:common_inherited_config" ]
132
133 deps = [
134 ":command_line_parser",
135 ":frame_editing_lib",
136 "//build/win:default_exe_manifest",
137 ]
138}
139
140executable("force_mic_volume_max") {
141 sources = [
142 "force_mic_volume_max/force_mic_volume_max.cc",
143 ]
144
145 configs += [ "..:common_config" ]
146 public_configs = [ "..:common_inherited_config" ]
147
148 if (is_clang) {
149 # Suppress warnings from the Chromium Clang plugin.
150 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
151 configs -= [ "//build/config/clang:find_bad_constructs" ]
152 }
153
154 deps = [
155 "../system_wrappers:system_wrappers_default",
156 "../voice_engine",
157 "//build/win:default_exe_manifest",
158 ]
159}
160
161source_set("agc_test_utils") {
162 testonly = true
163 sources = [
164 "agc/test_utils.cc",
165 "agc/test_utils.h",
166 ]
167
168 configs += [ "..:common_config" ]
169 public_configs = [ "..:common_inherited_config" ]
170}
171
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200172# Exclude tools depending on gflags since that's not available in Chromium.
kjellander@webrtc.orgaff499c2016-06-06 23:04:31 +0200173if (rtc_include_tests) {
terelius54ce6802016-07-13 06:44:41 -0700174 if (rtc_enable_protobuf) {
175 executable("event_log_visualizer") {
Stefan Holmer13181032016-07-29 14:48:54 +0200176 testonly = true
terelius54ce6802016-07-13 06:44:41 -0700177 sources = [
178 "event_log_visualizer/analyzer.cc",
179 "event_log_visualizer/analyzer.h",
180 "event_log_visualizer/generate_timeseries.cc",
181 "event_log_visualizer/plot_base.h",
182 "event_log_visualizer/plot_python.cc",
183 "event_log_visualizer/plot_python.h",
184 ]
185
186 configs += [ "..:common_config" ]
187 public_configs = [ "..:common_inherited_config" ]
188
189 if (is_clang && !is_nacl) {
190 # Suppress warnings from the Chromium Clang plugin.
191 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
192 configs -= [ "//build/config/clang:find_bad_constructs" ]
193 }
194
195 defines = [ "ENABLE_RTC_EVENT_LOG" ]
196 deps = [
Stefan Holmer13181032016-07-29 14:48:54 +0200197 "../:rtc_event_log",
terelius54ce6802016-07-13 06:44:41 -0700198 "../:rtc_event_log_parser",
Stefan Holmer13181032016-07-29 14:48:54 +0200199 "../modules/congestion_controller:congestion_controller",
terelius54ce6802016-07-13 06:44:41 -0700200 "../modules/rtp_rtcp:rtp_rtcp",
201 "../system_wrappers:system_wrappers_default",
Stefan Holmer13181032016-07-29 14:48:54 +0200202 "../test:field_trial",
terelius54ce6802016-07-13 06:44:41 -0700203 "//third_party/gflags",
204 ]
205 }
206 }
207
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200208 executable("agc_harness") {
209 testonly = true
210 sources = [
211 "agc/agc_harness.cc",
212 ]
kjellanderbac04122016-06-02 02:18:48 -0700213
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200214 configs += [ "..:common_config" ]
215 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700216
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200217 if (is_clang) {
218 # Suppress warnings from the Chromium Clang plugin.
219 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
220 configs -= [ "//build/config/clang:find_bad_constructs" ]
221 }
222
223 deps = [
224 "../system_wrappers:system_wrappers_default",
225 "../test:channel_transport",
226 "../test:test_support",
227 "../voice_engine",
228 "//build/win:default_exe_manifest",
229 "//testing/gtest",
230 "//third_party/gflags",
231 ]
kjellanderbac04122016-06-02 02:18:48 -0700232 }
233
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200234 executable("activity_metric") {
235 testonly = true
236 sources = [
237 "agc/activity_metric.cc",
238 ]
kjellanderbac04122016-06-02 02:18:48 -0700239
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200240 configs += [ "..:common_config" ]
241 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700242
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200243 if (is_clang) {
244 # Suppress warnings from the Chromium Clang plugin.
245 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
246 configs -= [ "//build/config/clang:find_bad_constructs" ]
247 }
kjellanderbac04122016-06-02 02:18:48 -0700248
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200249 deps = [
250 "../modules/audio_processing",
251 "../system_wrappers:metrics_default",
252 "//build/win:default_exe_manifest",
253 "//testing/gtest",
254 "//third_party/gflags",
255 ]
kjellanderbac04122016-06-02 02:18:48 -0700256 }
257
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200258 executable("audio_e2e_harness") {
259 testonly = true
260 sources = [
261 "e2e_quality/audio/audio_e2e_harness.cc",
262 ]
kjellanderbac04122016-06-02 02:18:48 -0700263
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200264 configs += [ "..:common_config" ]
265 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700266
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200267 if (is_clang) {
268 # Suppress warnings from the Chromium Clang plugin.
269 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
270 configs -= [ "//build/config/clang:find_bad_constructs" ]
271 }
kjellanderbac04122016-06-02 02:18:48 -0700272
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200273 deps = [
274 "../system_wrappers:system_wrappers_default",
275 "../test:channel_transport",
276 "../voice_engine",
277 "//build/win:default_exe_manifest",
278 "//testing/gtest",
279 "//third_party/gflags",
280 ]
kjellanderbac04122016-06-02 02:18:48 -0700281 }
282
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200283 test("tools_unittests") {
284 testonly = true
kjellanderbac04122016-06-02 02:18:48 -0700285
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200286 sources = [
287 "frame_analyzer/video_quality_analysis_unittest.cc",
288 "frame_editing/frame_editing_unittest.cc",
289 "simple_command_line_parser_unittest.cc",
290 ]
kjellanderbac04122016-06-02 02:18:48 -0700291
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200292 configs += [ "..:common_config" ]
293 public_configs = [ "..:common_inherited_config" ]
kjellanderbac04122016-06-02 02:18:48 -0700294
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200295 # TODO(jschuh): Bug 1348: fix this warning.
296 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
kjellanderbac04122016-06-02 02:18:48 -0700297
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200298 if (is_clang) {
299 # Suppress warnings from the Chromium Clang plugin.
300 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
301 configs -= [ "//build/config/clang:find_bad_constructs" ]
302 }
kjellanderbac04122016-06-02 02:18:48 -0700303
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200304 deps = [
305 ":command_line_parser",
306 ":frame_editing_lib",
307 ":video_quality_analysis",
308 "../test:test_support_main",
309 "//testing/gtest",
310 ]
kjellanderbac04122016-06-02 02:18:48 -0700311
kjellander@webrtc.orgdc0dbad2016-06-02 13:29:07 +0200312 if (is_android) {
313 deps += [ "//testing/android/native_test:native_test_support" ]
314 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000315 }
aleloi7ebbf902016-06-20 07:39:15 -0700316
317 if (rtc_enable_protobuf) {
318 copy("rtp_analyzer") {
319 sources = [
320 "py_event_log_analyzer/misc.py",
321 "py_event_log_analyzer/pb_parse.py",
322 "py_event_log_analyzer/rtp_analyzer.py",
323 "py_event_log_analyzer/rtp_analyzer.sh",
324 ]
325 outputs = [
326 "$root_build_dir/{{source_file_part}}",
327 ]
328 deps = [
329 "..:rtc_event_log_proto",
330 ]
331 }
332 }
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000333}