kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 1 | # 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 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 9 | import("//testing/test.gni") |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 10 | import("../build/webrtc.gni") |
| 11 | |
| 12 | source_set("tools") { |
| 13 | deps = [ |
| 14 | ":command_line_parser", |
| 15 | ] |
kjellander | a811968 | 2016-06-06 02:00:18 -0700 | [diff] [blame] | 16 | |
| 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.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | source_set("command_line_parser") { |
| 27 | sources = [ |
Henrik Kjellander | fa16dda | 2015-04-01 22:53:56 +0200 | [diff] [blame] | 28 | "simple_command_line_parser.cc", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 29 | "simple_command_line_parser.h", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 30 | ] |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 31 | deps = [ |
kjellander | 988d31e | 2016-02-05 00:23:50 -0800 | [diff] [blame] | 32 | "../base:gtest_prod", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 33 | ] |
kjellander@webrtc.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 34 | configs += [ "..:common_config" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 35 | public_configs = [ "..:common_inherited_config" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 38 | source_set("video_quality_analysis") { |
| 39 | sources = [ |
| 40 | "frame_analyzer/video_quality_analysis.cc", |
| 41 | "frame_analyzer/video_quality_analysis.h", |
| 42 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 43 | |
| 44 | configs += [ "..:common_config" ] |
| 45 | public_configs = [ "..:common_inherited_config" ] |
| 46 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 47 | deps = [ |
| 48 | "../common_video", |
| 49 | ] |
| 50 | public_deps = [ |
| 51 | "../common_video", |
| 52 | ] |
| 53 | } |
| 54 | |
| 55 | executable("frame_analyzer") { |
| 56 | sources = [ |
| 57 | "frame_analyzer/frame_analyzer.cc", |
| 58 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 59 | |
| 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 | |
| 70 | executable("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 Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 78 | deps = [ |
| 79 | ":command_line_parser", |
| 80 | ":video_quality_analysis", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 81 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 82 | ] |
| 83 | } |
| 84 | |
| 85 | executable("rgba_to_i420_converter") { |
| 86 | sources = [ |
| 87 | "converter/converter.cc", |
| 88 | "converter/converter.h", |
| 89 | "converter/rgba_to_i420_converter.cc", |
| 90 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 91 | |
| 92 | configs += [ "..:common_config" ] |
| 93 | public_configs = [ "..:common_inherited_config" ] |
| 94 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 95 | deps = [ |
| 96 | ":command_line_parser", |
| 97 | "../common_video", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 98 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 99 | ] |
| 100 | } |
| 101 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 102 | source_set("frame_editing_lib") { |
| 103 | sources = [ |
| 104 | "frame_editing/frame_editing_lib.cc", |
| 105 | "frame_editing/frame_editing_lib.h", |
| 106 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 107 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 108 | configs += [ "..:common_config" ] |
| 109 | public_configs = [ "..:common_inherited_config" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 110 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 111 | # TODO(jschuh): Bug 1348: fix this warning. |
| 112 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 113 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 114 | 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.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 119 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 120 | deps = [ |
| 121 | "../common_video", |
| 122 | ] |
| 123 | } |
| 124 | |
| 125 | executable("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 | |
| 140 | executable("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 | |
| 161 | source_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.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 172 | # Exclude tools depending on gflags since that's not available in Chromium. |
kjellander@webrtc.org | aff499c | 2016-06-06 23:04:31 +0200 | [diff] [blame] | 173 | if (rtc_include_tests) { |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 174 | if (rtc_enable_protobuf) { |
| 175 | executable("event_log_visualizer") { |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 176 | testonly = true |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 177 | sources = [ |
| 178 | "event_log_visualizer/analyzer.cc", |
| 179 | "event_log_visualizer/analyzer.h", |
| 180 | "event_log_visualizer/generate_timeseries.cc", |
terelius | dc35dcd | 2016-08-01 12:03:27 -0700 | [diff] [blame^] | 181 | "event_log_visualizer/plot_base.cc", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 182 | "event_log_visualizer/plot_base.h", |
| 183 | "event_log_visualizer/plot_python.cc", |
| 184 | "event_log_visualizer/plot_python.h", |
| 185 | ] |
| 186 | |
| 187 | configs += [ "..:common_config" ] |
| 188 | public_configs = [ "..:common_inherited_config" ] |
| 189 | |
| 190 | if (is_clang && !is_nacl) { |
| 191 | # Suppress warnings from the Chromium Clang plugin. |
| 192 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 193 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 194 | } |
| 195 | |
| 196 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 197 | deps = [ |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 198 | "../:rtc_event_log", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 199 | "../:rtc_event_log_parser", |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 200 | "../modules/congestion_controller:congestion_controller", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 201 | "../modules/rtp_rtcp:rtp_rtcp", |
| 202 | "../system_wrappers:system_wrappers_default", |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 203 | "../test:field_trial", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 204 | "//third_party/gflags", |
| 205 | ] |
| 206 | } |
| 207 | } |
| 208 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 209 | executable("agc_harness") { |
| 210 | testonly = true |
| 211 | sources = [ |
| 212 | "agc/agc_harness.cc", |
| 213 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 214 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 215 | configs += [ "..:common_config" ] |
| 216 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 217 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 218 | if (is_clang) { |
| 219 | # Suppress warnings from the Chromium Clang plugin. |
| 220 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 221 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 222 | } |
| 223 | |
| 224 | deps = [ |
| 225 | "../system_wrappers:system_wrappers_default", |
| 226 | "../test:channel_transport", |
| 227 | "../test:test_support", |
| 228 | "../voice_engine", |
| 229 | "//build/win:default_exe_manifest", |
| 230 | "//testing/gtest", |
| 231 | "//third_party/gflags", |
| 232 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 233 | } |
| 234 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 235 | executable("activity_metric") { |
| 236 | testonly = true |
| 237 | sources = [ |
| 238 | "agc/activity_metric.cc", |
| 239 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 240 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 241 | configs += [ "..:common_config" ] |
| 242 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 243 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 244 | if (is_clang) { |
| 245 | # Suppress warnings from the Chromium Clang plugin. |
| 246 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 247 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 248 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 249 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 250 | deps = [ |
| 251 | "../modules/audio_processing", |
| 252 | "../system_wrappers:metrics_default", |
| 253 | "//build/win:default_exe_manifest", |
| 254 | "//testing/gtest", |
| 255 | "//third_party/gflags", |
| 256 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 257 | } |
| 258 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 259 | executable("audio_e2e_harness") { |
| 260 | testonly = true |
| 261 | sources = [ |
| 262 | "e2e_quality/audio/audio_e2e_harness.cc", |
| 263 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 264 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 265 | configs += [ "..:common_config" ] |
| 266 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 267 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 268 | if (is_clang) { |
| 269 | # Suppress warnings from the Chromium Clang plugin. |
| 270 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 271 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 272 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 273 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 274 | deps = [ |
| 275 | "../system_wrappers:system_wrappers_default", |
| 276 | "../test:channel_transport", |
| 277 | "../voice_engine", |
| 278 | "//build/win:default_exe_manifest", |
| 279 | "//testing/gtest", |
| 280 | "//third_party/gflags", |
| 281 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 282 | } |
| 283 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 284 | test("tools_unittests") { |
| 285 | testonly = true |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 286 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 287 | sources = [ |
| 288 | "frame_analyzer/video_quality_analysis_unittest.cc", |
| 289 | "frame_editing/frame_editing_unittest.cc", |
| 290 | "simple_command_line_parser_unittest.cc", |
| 291 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 292 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 293 | configs += [ "..:common_config" ] |
| 294 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 295 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 296 | # TODO(jschuh): Bug 1348: fix this warning. |
| 297 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 298 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 299 | if (is_clang) { |
| 300 | # Suppress warnings from the Chromium Clang plugin. |
| 301 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 302 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 303 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 304 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 305 | deps = [ |
| 306 | ":command_line_parser", |
| 307 | ":frame_editing_lib", |
| 308 | ":video_quality_analysis", |
| 309 | "../test:test_support_main", |
| 310 | "//testing/gtest", |
| 311 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 312 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 313 | if (is_android) { |
| 314 | deps += [ "//testing/android/native_test:native_test_support" ] |
| 315 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 316 | } |
aleloi | 7ebbf90 | 2016-06-20 07:39:15 -0700 | [diff] [blame] | 317 | |
| 318 | if (rtc_enable_protobuf) { |
| 319 | copy("rtp_analyzer") { |
| 320 | sources = [ |
| 321 | "py_event_log_analyzer/misc.py", |
| 322 | "py_event_log_analyzer/pb_parse.py", |
| 323 | "py_event_log_analyzer/rtp_analyzer.py", |
| 324 | "py_event_log_analyzer/rtp_analyzer.sh", |
| 325 | ] |
| 326 | outputs = [ |
| 327 | "$root_build_dir/{{source_file_part}}", |
| 328 | ] |
| 329 | deps = [ |
| 330 | "..:rtc_event_log_proto", |
| 331 | ] |
| 332 | } |
| 333 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 334 | } |