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", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 66 | "//build/config/sanitizers:deps", |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 67 | "//build/win:default_exe_manifest", |
| 68 | ] |
| 69 | } |
| 70 | |
| 71 | executable("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 Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 79 | deps = [ |
| 80 | ":command_line_parser", |
| 81 | ":video_quality_analysis", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 82 | "//build/config/sanitizers:deps", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 83 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 84 | ] |
| 85 | } |
| 86 | |
| 87 | executable("rgba_to_i420_converter") { |
| 88 | sources = [ |
| 89 | "converter/converter.cc", |
| 90 | "converter/converter.h", |
| 91 | "converter/rgba_to_i420_converter.cc", |
| 92 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 93 | |
| 94 | configs += [ "..:common_config" ] |
| 95 | public_configs = [ "..:common_inherited_config" ] |
| 96 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 97 | deps = [ |
| 98 | ":command_line_parser", |
| 99 | "../common_video", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 100 | "//build/config/sanitizers:deps", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 101 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 102 | ] |
| 103 | } |
| 104 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 105 | source_set("frame_editing_lib") { |
| 106 | sources = [ |
| 107 | "frame_editing/frame_editing_lib.cc", |
| 108 | "frame_editing/frame_editing_lib.h", |
| 109 | ] |
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 | configs += [ "..:common_config" ] |
| 112 | public_configs = [ "..:common_inherited_config" ] |
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 | # TODO(jschuh): Bug 1348: fix this warning. |
| 115 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 116 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 117 | 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.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 122 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 123 | deps = [ |
| 124 | "../common_video", |
| 125 | ] |
| 126 | } |
| 127 | |
| 128 | executable("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", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 139 | "//build/config/sanitizers:deps", |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 140 | "//build/win:default_exe_manifest", |
| 141 | ] |
| 142 | } |
| 143 | |
| 144 | executable("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", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 161 | "//build/config/sanitizers:deps", |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 162 | "//build/win:default_exe_manifest", |
| 163 | ] |
| 164 | } |
| 165 | |
| 166 | source_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.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 177 | # 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] | 178 | if (rtc_include_tests) { |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 179 | if (rtc_enable_protobuf) { |
| 180 | executable("event_log_visualizer") { |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 181 | testonly = true |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 182 | sources = [ |
| 183 | "event_log_visualizer/analyzer.cc", |
| 184 | "event_log_visualizer/analyzer.h", |
terelius | d49a37b | 2016-08-10 07:12:38 -0700 | [diff] [blame] | 185 | "event_log_visualizer/main.cc", |
terelius | dc35dcd | 2016-08-01 12:03:27 -0700 | [diff] [blame] | 186 | "event_log_visualizer/plot_base.cc", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 187 | "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 Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 203 | "../:rtc_event_log", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 204 | "../:rtc_event_log_parser", |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 205 | "../modules/congestion_controller:congestion_controller", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 206 | "../modules/rtp_rtcp:rtp_rtcp", |
| 207 | "../system_wrappers:system_wrappers_default", |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 208 | "../test:field_trial", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame^] | 209 | "//build/config/sanitizers:deps", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 210 | "//third_party/gflags", |
| 211 | ] |
| 212 | } |
| 213 | } |
| 214 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 215 | executable("agc_harness") { |
| 216 | testonly = true |
| 217 | sources = [ |
| 218 | "agc/agc_harness.cc", |
| 219 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 220 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 221 | configs += [ "..:common_config" ] |
| 222 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 223 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 224 | 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 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 239 | } |
| 240 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 241 | executable("activity_metric") { |
| 242 | testonly = true |
| 243 | sources = [ |
| 244 | "agc/activity_metric.cc", |
| 245 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 246 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 247 | configs += [ "..:common_config" ] |
| 248 | public_configs = [ "..:common_inherited_config" ] |
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 | 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 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 255 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 256 | deps = [ |
| 257 | "../modules/audio_processing", |
| 258 | "../system_wrappers:metrics_default", |
| 259 | "//build/win:default_exe_manifest", |
| 260 | "//testing/gtest", |
| 261 | "//third_party/gflags", |
| 262 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 263 | } |
| 264 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 265 | executable("audio_e2e_harness") { |
| 266 | testonly = true |
| 267 | sources = [ |
| 268 | "e2e_quality/audio/audio_e2e_harness.cc", |
| 269 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 270 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 271 | configs += [ "..:common_config" ] |
| 272 | public_configs = [ "..:common_inherited_config" ] |
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 | 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 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 279 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 280 | 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 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 288 | } |
| 289 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 290 | test("tools_unittests") { |
| 291 | testonly = true |
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 | sources = [ |
| 294 | "frame_analyzer/video_quality_analysis_unittest.cc", |
| 295 | "frame_editing/frame_editing_unittest.cc", |
| 296 | "simple_command_line_parser_unittest.cc", |
| 297 | ] |
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 | configs += [ "..:common_config" ] |
| 300 | public_configs = [ "..:common_inherited_config" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 301 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 302 | # TODO(jschuh): Bug 1348: fix this warning. |
| 303 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
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 | 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 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 310 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 311 | deps = [ |
| 312 | ":command_line_parser", |
| 313 | ":frame_editing_lib", |
| 314 | ":video_quality_analysis", |
| 315 | "../test:test_support_main", |
| 316 | "//testing/gtest", |
| 317 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 318 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 319 | if (is_android) { |
| 320 | deps += [ "//testing/android/native_test:native_test_support" ] |
ehmaldonado | 4556b45 | 2016-08-10 07:47:14 -0700 | [diff] [blame] | 321 | |
| 322 | data = [ |
| 323 | "//resources/foreman_cif.yuv", |
| 324 | ] |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 325 | |
| 326 | shard_timeout = 900 |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 327 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 328 | } |
aleloi | 7ebbf90 | 2016-06-20 07:39:15 -0700 | [diff] [blame] | 329 | |
| 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.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 346 | } |