kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +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@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 9 | # TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330. |
| 10 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 11 | import("//build/config/linux/pkg_config.gni") |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 12 | import("//build/config/sanitizers/sanitizers.gni") |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 13 | import("build/webrtc.gni") |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 14 | import("//testing/test.gni") |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 15 | import("//third_party/protobuf/proto_library.gni") |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 16 | |
| 17 | # Contains the defines and includes in common.gypi that are duplicated both as |
| 18 | # target_defaults and direct_dependent_settings. |
| 19 | config("common_inherited_config") { |
| 20 | defines = [] |
Johan Ahlers | 9ddac18 | 2016-07-22 08:57:23 +0200 | [diff] [blame] | 21 | cflags = [] |
| 22 | ldflags = [] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 23 | if (build_with_mozilla) { |
| 24 | defines += [ "WEBRTC_MOZILLA_BUILD" ] |
| 25 | } |
| 26 | if (build_with_chromium) { |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 27 | defines = [ |
| 28 | # TODO(kjellander): Cleanup unused ones and move defines closer to |
| 29 | # the source when webrtc:4256 is completed. |
| 30 | "FEATURE_ENABLE_SSL", |
| 31 | "FEATURE_ENABLE_VOICEMAIL", |
| 32 | "EXPAT_RELATIVE_PATH", |
| 33 | "GTEST_RELATIVE_PATH", |
| 34 | "NO_MAIN_THREAD_WRAPPING", |
| 35 | "NO_SOUND_SYSTEM", |
| 36 | "WEBRTC_CHROMIUM_BUILD", |
| 37 | ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 38 | include_dirs = [ |
henrikg | ee2bf41 | 2015-09-30 03:48:52 -0700 | [diff] [blame] | 39 | # The overrides must be included first as that is the mechanism for |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 40 | # selecting the override headers in Chromium. |
henrikg | ee2bf41 | 2015-09-30 03:48:52 -0700 | [diff] [blame] | 41 | "../webrtc_overrides", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 42 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 43 | # Allow includes to be prefixed with webrtc/ in case it is not an |
| 44 | # immediate subdirectory of the top-level. |
| 45 | "..", |
| 46 | ] |
| 47 | } |
| 48 | if (is_posix) { |
| 49 | defines += [ "WEBRTC_POSIX" ] |
| 50 | } |
| 51 | if (is_ios) { |
| 52 | defines += [ |
| 53 | "WEBRTC_MAC", |
| 54 | "WEBRTC_IOS", |
| 55 | ] |
| 56 | } |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 57 | if (is_ios && rtc_use_objc_h264) { |
| 58 | defines += [ "WEBRTC_OBJC_H264" ] |
| 59 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 60 | if (is_linux) { |
| 61 | defines += [ "WEBRTC_LINUX" ] |
| 62 | } |
| 63 | if (is_mac) { |
| 64 | defines += [ "WEBRTC_MAC" ] |
| 65 | } |
| 66 | if (is_win) { |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 67 | defines += [ |
| 68 | "WEBRTC_WIN", |
| 69 | "_CRT_SECURE_NO_WARNINGS", # Suppress warnings about _vsnprinf |
| 70 | ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 71 | } |
| 72 | if (is_android) { |
| 73 | defines += [ |
| 74 | "WEBRTC_LINUX", |
| 75 | "WEBRTC_ANDROID", |
| 76 | ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 77 | } |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 78 | if (is_chromeos) { |
| 79 | defines += [ "CHROMEOS" ] |
| 80 | } |
| 81 | |
Johan Ahlers | 9ddac18 | 2016-07-22 08:57:23 +0200 | [diff] [blame] | 82 | if (rtc_sanitize_coverage != "") { |
| 83 | assert(is_clang, "sanitizer coverage requires clang") |
| 84 | cflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ] |
| 85 | ldflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ] |
| 86 | } |
| 87 | |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 88 | # TODO(GYP): Support these in GN. |
| 89 | # if (is_bsd) { |
| 90 | # defines += [ "BSD" ] |
| 91 | # } |
| 92 | # if (is_openbsd) { |
| 93 | # defines += [ "OPENBSD" ] |
| 94 | # } |
| 95 | # if (is_freebsd) { |
| 96 | # defines += [ "FREEBSD" ] |
| 97 | # } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 98 | } |
| 99 | |
kjellander@webrtc.org | 6d08ca6 | 2014-09-07 17:36:10 +0000 | [diff] [blame] | 100 | if (rtc_have_dbus_glib) { |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 101 | pkg_config("dbus-glib") { |
| 102 | packages = [ "dbus-glib-1" ] |
| 103 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | config("common_config") { |
kjellander@webrtc.org | 79ee97c | 2014-09-04 14:10:49 +0000 | [diff] [blame] | 107 | cflags = [] |
| 108 | cflags_cc = [] |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 109 | defines = [] |
| 110 | |
kjellander@webrtc.org | 6d08ca6 | 2014-09-07 17:36:10 +0000 | [diff] [blame] | 111 | if (rtc_restrict_logging) { |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 112 | defines += [ "WEBRTC_RESTRICT_LOGGING" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 113 | } |
| 114 | |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 115 | if (rtc_include_internal_audio_device) { |
| 116 | defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ] |
| 117 | } |
| 118 | |
kjellander@webrtc.org | 6d08ca6 | 2014-09-07 17:36:10 +0000 | [diff] [blame] | 119 | if (rtc_have_dbus_glib) { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 120 | defines += [ "HAVE_DBUS_GLIB" ] |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 121 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 122 | # TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h> |
| 123 | # is still not found even if the execution of |
| 124 | # build/config/linux/pkg-config.py dbus-glib-1 returns correct include |
| 125 | # dirs on Linux. |
| 126 | all_dependent_configs = [ "dbus-glib" ] |
| 127 | } |
| 128 | |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 129 | if (rtc_relative_path) { |
| 130 | defines += [ "EXPAT_RELATIVE_PATH" ] |
| 131 | } |
| 132 | |
brettw@chromium.org | 9fe1101 | 2014-09-09 19:15:33 +0000 | [diff] [blame] | 133 | if (build_with_chromium) { |
kjellander | f0e174a | 2016-05-30 06:27:50 -0700 | [diff] [blame] | 134 | defines += [ |
| 135 | # NOTICE: Since common_inherited_config is used in public_configs for our |
| 136 | # targets, there's no point including the defines in that config here. |
| 137 | # TODO(kjellander): Cleanup unused ones and move defines closer to the |
| 138 | # source when webrtc:4256 is completed. |
| 139 | "ENABLE_EXTERNAL_AUTH", |
| 140 | "HAVE_OPENSSL_SSL_H", |
| 141 | "HAVE_SCTP", |
| 142 | "HAVE_SRTP", |
| 143 | "HAVE_WEBRTC_VIDEO", |
| 144 | "HAVE_WEBRTC_VOICE", |
| 145 | "LOGGING_INSIDE_WEBRTC", |
| 146 | "SRTP_RELATIVE_PATH", |
| 147 | "SSL_USE_OPENSSL", |
| 148 | "USE_WEBRTC_DEV_BRANCH", |
| 149 | ] |
brettw@chromium.org | 9fe1101 | 2014-09-09 19:15:33 +0000 | [diff] [blame] | 150 | } else { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 151 | if (is_posix) { |
| 152 | # -Wextra is currently disabled in Chromium"s common.gypi. Enable |
| 153 | # for targets that can handle it. For Android/arm64 right now |
| 154 | # there will be an "enumeral and non-enumeral type in conditional |
| 155 | # expression" warning in android_tools/ndk_experimental"s version |
| 156 | # of stlport. |
| 157 | # See: https://code.google.com/p/chromium/issues/detail?id=379699 |
kjellander@webrtc.org | 7227391 | 2015-02-23 19:08:31 +0000 | [diff] [blame] | 158 | if (current_cpu != "arm64" || !is_android) { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 159 | cflags = [ |
| 160 | "-Wextra", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 161 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 162 | # We need to repeat some flags from Chromium"s common.gypi |
| 163 | # here that get overridden by -Wextra. |
| 164 | "-Wno-unused-parameter", |
| 165 | "-Wno-missing-field-initializers", |
| 166 | "-Wno-strict-overflow", |
| 167 | ] |
| 168 | cflags_cc = [ |
| 169 | "-Wnon-virtual-dtor", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 170 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 171 | # This is enabled for clang; enable for gcc as well. |
| 172 | "-Woverloaded-virtual", |
| 173 | ] |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | if (is_clang) { |
kjellander | 3f032cf | 2016-04-27 07:13:46 -0700 | [diff] [blame] | 178 | cflags += [ |
| 179 | "-Wimplicit-fallthrough", |
| 180 | "-Wthread-safety", |
nisse | 4996eaa | 2016-05-10 23:28:10 -0700 | [diff] [blame] | 181 | "-Winconsistent-missing-override", |
kjellander | 3f032cf | 2016-04-27 07:13:46 -0700 | [diff] [blame] | 182 | ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 183 | } |
| 184 | } |
| 185 | |
kjellander@webrtc.org | 7227391 | 2015-02-23 19:08:31 +0000 | [diff] [blame] | 186 | if (current_cpu == "arm64") { |
Andrew MacDonald | cb7f8ce | 2015-05-19 22:20:17 -0700 | [diff] [blame] | 187 | defines += [ "WEBRTC_ARCH_ARM64" ] |
| 188 | defines += [ "WEBRTC_HAS_NEON" ] |
tkchin@webrtc.org | 14146e4 | 2014-10-31 00:14:39 +0000 | [diff] [blame] | 189 | } |
| 190 | |
kjellander@webrtc.org | 7227391 | 2015-02-23 19:08:31 +0000 | [diff] [blame] | 191 | if (current_cpu == "arm") { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 192 | defines += [ "WEBRTC_ARCH_ARM" ] |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 193 | if (arm_version >= 7) { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 194 | defines += [ "WEBRTC_ARCH_ARM_V7" ] |
| 195 | if (arm_use_neon) { |
Andrew MacDonald | cb7f8ce | 2015-05-19 22:20:17 -0700 | [diff] [blame] | 196 | defines += [ "WEBRTC_HAS_NEON" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
kjellander@webrtc.org | 7227391 | 2015-02-23 19:08:31 +0000 | [diff] [blame] | 201 | if (current_cpu == "mipsel") { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 202 | defines += [ "MIPS32_LE" ] |
kjellander@webrtc.org | 6dab6d7 | 2015-03-04 09:50:31 +0000 | [diff] [blame] | 203 | if (mips_float_abi == "hard") { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 204 | defines += [ "MIPS_FPU_LE" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 205 | } |
kjellander@webrtc.org | acb8085 | 2015-01-25 19:17:56 +0000 | [diff] [blame] | 206 | if (mips_arch_variant == "r2") { |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 207 | defines += [ "MIPS32_R2_LE" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 208 | } |
| 209 | if (mips_dsp_rev == 1) { |
| 210 | defines += [ "MIPS_DSP_R1_LE" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 211 | } else if (mips_dsp_rev == 2) { |
| 212 | defines += [ |
| 213 | "MIPS_DSP_R1_LE", |
| 214 | "MIPS_DSP_R2_LE", |
| 215 | ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 216 | } |
| 217 | } |
| 218 | |
Henrik Kjellander | c0c7d2e | 2015-09-07 12:57:42 +0200 | [diff] [blame] | 219 | if (is_android && !is_clang) { |
Henrik Kjellander | 5bfc6cb | 2015-09-21 16:50:45 +0200 | [diff] [blame] | 220 | # The Android NDK doesn"t provide optimized versions of these |
| 221 | # functions. Ensure they are disabled for all compilers. |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 222 | cflags += [ |
| 223 | "-fno-builtin-cos", |
| 224 | "-fno-builtin-sin", |
| 225 | "-fno-builtin-cosf", |
| 226 | "-fno-builtin-sinf", |
| 227 | ] |
| 228 | } |
katrielc | bf81d68 | 2016-05-26 01:03:02 -0700 | [diff] [blame] | 229 | |
metzman | f89a571 | 2016-07-25 02:14:09 -0700 | [diff] [blame] | 230 | if (use_libfuzzer || use_drfuzz || use_afl) { |
katrielc | bf81d68 | 2016-05-26 01:03:02 -0700 | [diff] [blame] | 231 | # Used in Chromium's overrides to disable logging |
| 232 | defines += [ "WEBRTC_UNSAFE_FUZZER_MODE" ] |
| 233 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 234 | } |
| 235 | |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 236 | config("common_objc") { |
tkchin | 2ddfdba | 2016-08-07 21:37:45 -0700 | [diff] [blame] | 237 | libs = [ "Foundation.framework" ] |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 238 | precompiled_header = "sdk/objc/WebRTC-Prefix.pch" |
| 239 | precompiled_source = "sdk/objc/WebRTC-Prefix.pch" |
| 240 | } |
| 241 | |
Nico Weber | 3ab32dc | 2016-08-02 09:53:25 -0400 | [diff] [blame] | 242 | if (!is_ios || !build_with_chromium) { |
| 243 | source_set("webrtc") { |
| 244 | sources = [ |
| 245 | "call.h", |
| 246 | "config.h", |
| 247 | "transport.h", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 248 | ] |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 249 | |
Nico Weber | 3ab32dc | 2016-08-02 09:53:25 -0400 | [diff] [blame] | 250 | defines = [] |
| 251 | configs += [ ":common_config" ] |
| 252 | public_configs = [ ":common_inherited_config" ] |
| 253 | |
| 254 | deps = [ |
| 255 | ":webrtc_common", |
| 256 | "audio", |
| 257 | "base:rtc_base", |
| 258 | "call", |
| 259 | "common_audio", |
| 260 | "common_video", |
| 261 | "modules", |
hbos | 615d301 | 2016-08-24 01:33:13 -0700 | [diff] [blame] | 262 | "stats", |
Nico Weber | 3ab32dc | 2016-08-02 09:53:25 -0400 | [diff] [blame] | 263 | "system_wrappers", |
| 264 | "tools", |
| 265 | "video", |
| 266 | "voice_engine", |
| 267 | ] |
| 268 | |
| 269 | if (build_with_chromium) { |
| 270 | deps += [ "modules/video_capture" ] |
| 271 | } else { |
| 272 | # TODO(kjellander): Enable for Chromium as well when bugs.webrtc.org/4256 |
| 273 | # is fixed. Right now it's not possible due to circular dependencies. |
| 274 | deps += [ |
| 275 | "api", |
| 276 | "media", |
| 277 | "p2p", |
| 278 | "pc", |
| 279 | ] |
| 280 | } |
| 281 | |
| 282 | if (rtc_enable_protobuf) { |
| 283 | defines += [ "ENABLE_RTC_EVENT_LOG" ] |
| 284 | deps += [ ":rtc_event_log_proto" ] |
| 285 | } |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 286 | } |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 287 | } |
| 288 | |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 289 | if (!build_with_chromium) { |
| 290 | executable("webrtc_tests") { |
| 291 | testonly = true |
| 292 | deps = [ |
| 293 | ":webrtc", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 294 | "modules/video_capture:video_capture_internal_impl", |
| 295 | "test", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame] | 296 | "//build/config/sanitizers:deps", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 297 | ] |
| 298 | } |
stefan | 3ab6614 | 2016-08-15 06:29:10 -0700 | [diff] [blame] | 299 | |
| 300 | executable("video_loopback") { |
| 301 | testonly = true |
| 302 | sources = [ |
| 303 | "test/run_test.h", |
| 304 | "video/video_loopback.cc", |
| 305 | ] |
| 306 | |
| 307 | if (is_mac) { |
| 308 | sources += [ "test/mac/run_test.mm" ] |
| 309 | } else { |
| 310 | sources += [ "test/run_test.cc" ] |
| 311 | } |
| 312 | deps = [ |
| 313 | ":video_quality_test", |
| 314 | "system_wrappers:metrics_default", |
| 315 | "test:field_trial", |
| 316 | "test:test_common", |
| 317 | "test:test_renderer", |
ehmaldonado | bcba64a | 2016-08-19 02:11:07 -0700 | [diff] [blame] | 318 | "//build/config/sanitizers:deps", |
stefan | 3ab6614 | 2016-08-15 06:29:10 -0700 | [diff] [blame] | 319 | "//testing/gmock", |
| 320 | "//testing/gtest", |
| 321 | "//third_party/gflags", |
| 322 | ] |
| 323 | if (is_clang && !is_nacl) { |
| 324 | # Suppress warnings from Chrome's Clang plugins. |
| 325 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 326 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 327 | } |
| 328 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 329 | } |
| 330 | |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 331 | source_set("webrtc_common") { |
| 332 | sources = [ |
kjellander@webrtc.org | 50772f1 | 2016-02-29 06:49:43 +0100 | [diff] [blame] | 333 | "audio_sink.h", |
kwiberg | 65fc8b9 | 2016-08-29 10:05:24 -0700 | [diff] [blame] | 334 | "common.cc", |
| 335 | "common.h", |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 336 | "common_types.cc", |
kjellander@webrtc.org | d7e34e1 | 2015-01-26 19:17:26 +0000 | [diff] [blame] | 337 | "common_types.h", |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 338 | "config.cc", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 339 | "config.h", |
kjellander@webrtc.org | d7e34e1 | 2015-01-26 19:17:26 +0000 | [diff] [blame] | 340 | "engine_configurations.h", |
| 341 | "typedefs.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 342 | ] |
kjellander@webrtc.org | 9bef551 | 2014-07-13 09:02:54 +0000 | [diff] [blame] | 343 | |
kjellander@webrtc.org | f21ea91 | 2014-09-28 17:37:22 +0000 | [diff] [blame] | 344 | configs += [ ":common_config" ] |
| 345 | public_configs = [ ":common_inherited_config" ] |
aluebs | 688e308 | 2016-01-14 04:32:46 -0800 | [diff] [blame] | 346 | |
| 347 | if (is_clang && !is_nacl) { |
| 348 | # Suppress warnings from Chrome's Clang plugins. |
| 349 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 350 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 351 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 352 | } |
kjellander@webrtc.org | d7e34e1 | 2015-01-26 19:17:26 +0000 | [diff] [blame] | 353 | |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 354 | if (rtc_enable_protobuf) { |
| 355 | proto_library("rtc_event_log_proto") { |
| 356 | sources = [ |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 357 | "call/rtc_event_log.proto", |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 358 | ] |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 359 | proto_out_dir = "webrtc/call" |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 360 | } |
| 361 | } |
| 362 | |
| 363 | source_set("rtc_event_log") { |
| 364 | sources = [ |
Peter Boström | 5c389d3 | 2015-09-25 13:58:30 +0200 | [diff] [blame] | 365 | "call/rtc_event_log.cc", |
| 366 | "call/rtc_event_log.h", |
terelius | 4311ba5 | 2016-04-22 12:40:37 -0700 | [diff] [blame] | 367 | "call/rtc_event_log_helper_thread.cc", |
| 368 | "call/rtc_event_log_helper_thread.h", |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 369 | ] |
| 370 | |
| 371 | defines = [] |
| 372 | configs += [ ":common_config" ] |
| 373 | public_configs = [ ":common_inherited_config" ] |
| 374 | |
| 375 | deps = [ |
| 376 | ":webrtc_common", |
sakal | 06bfe1f | 2016-08-04 07:54:04 -0700 | [diff] [blame] | 377 | "modules/rtp_rtcp", |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 378 | ] |
| 379 | |
| 380 | if (rtc_enable_protobuf) { |
| 381 | defines += [ "ENABLE_RTC_EVENT_LOG" ] |
| 382 | deps += [ ":rtc_event_log_proto" ] |
| 383 | } |
sergeyu | 4df08ff | 2015-09-02 14:22:40 -0700 | [diff] [blame] | 384 | if (is_clang && !is_nacl) { |
Bjorn Terelius | 3641185 | 2015-07-30 12:45:18 +0200 | [diff] [blame] | 385 | # Suppress warnings from Chrome's Clang plugins. |
| 386 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 387 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 388 | } |
| 389 | } |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 390 | |
terelius | d5c1a0b | 2016-05-13 00:42:59 -0700 | [diff] [blame] | 391 | if (rtc_enable_protobuf) { |
| 392 | source_set("rtc_event_log_parser") { |
| 393 | sources = [ |
| 394 | "call/rtc_event_log_parser.cc", |
| 395 | "call/rtc_event_log_parser.h", |
| 396 | ] |
| 397 | |
| 398 | configs += [ ":common_config" ] |
| 399 | public_configs = [ ":common_inherited_config" ] |
| 400 | |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 401 | public_deps = [ |
terelius | d5c1a0b | 2016-05-13 00:42:59 -0700 | [diff] [blame] | 402 | ":rtc_event_log_proto", |
| 403 | ":webrtc_common", |
| 404 | ] |
| 405 | |
| 406 | if (is_clang && !is_nacl) { |
| 407 | # Suppress warnings from Chrome's Clang plugins. |
| 408 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 409 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | |
metzman | f89a571 | 2016-07-25 02:14:09 -0700 | [diff] [blame] | 414 | if (use_libfuzzer || use_drfuzz || use_afl) { |
Peter Boström | 1e0cfd9 | 2015-12-17 14:28:16 +0100 | [diff] [blame] | 415 | # This target is only here for gn to discover fuzzer build targets under |
| 416 | # webrtc/test/fuzzers/. |
| 417 | group("webrtc_fuzzers_dummy") { |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 418 | testonly = true |
| 419 | deps = [ |
Peter Boström | 1e0cfd9 | 2015-12-17 14:28:16 +0100 | [diff] [blame] | 420 | "test/fuzzers:webrtc_fuzzer_main", |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 421 | ] |
| 422 | } |
| 423 | } |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 424 | |
kjellander@webrtc.org | aff499c | 2016-06-06 23:04:31 +0200 | [diff] [blame] | 425 | if (rtc_include_tests) { |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 426 | config("rtc_unittests_config") { |
| 427 | # GN orders flags on a target before flags from configs. The default config |
| 428 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 429 | # come from a config and can"t be on the target directly. |
| 430 | if (is_clang) { |
| 431 | cflags = [ |
| 432 | "-Wno-missing-braces", |
| 433 | "-Wno-sign-compare", |
| 434 | "-Wno-unused-const-variable", |
| 435 | ] |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | test("rtc_unittests") { |
| 440 | testonly = true |
| 441 | sources = [ |
| 442 | "base/array_view_unittest.cc", |
| 443 | "base/atomicops_unittest.cc", |
| 444 | "base/autodetectproxy_unittest.cc", |
| 445 | "base/bandwidthsmoother_unittest.cc", |
| 446 | "base/base64_unittest.cc", |
| 447 | "base/basictypes_unittest.cc", |
| 448 | "base/bind_unittest.cc", |
| 449 | "base/bitbuffer_unittest.cc", |
| 450 | "base/buffer_unittest.cc", |
| 451 | "base/bufferqueue_unittest.cc", |
| 452 | "base/bytebuffer_unittest.cc", |
| 453 | "base/byteorder_unittest.cc", |
| 454 | "base/callback_unittest.cc", |
| 455 | "base/copyonwritebuffer_unittest.cc", |
| 456 | "base/crc32_unittest.cc", |
| 457 | "base/criticalsection_unittest.cc", |
| 458 | "base/event_tracer_unittest.cc", |
| 459 | "base/event_unittest.cc", |
| 460 | "base/exp_filter_unittest.cc", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 461 | "base/filerotatingstream_unittest.cc", |
| 462 | "base/fileutils_unittest.cc", |
| 463 | "base/helpers_unittest.cc", |
| 464 | "base/httpbase_unittest.cc", |
| 465 | "base/httpcommon_unittest.cc", |
| 466 | "base/httpserver_unittest.cc", |
| 467 | "base/ipaddress_unittest.cc", |
| 468 | "base/logging_unittest.cc", |
| 469 | "base/md5digest_unittest.cc", |
| 470 | "base/messagedigest_unittest.cc", |
| 471 | "base/messagequeue_unittest.cc", |
| 472 | "base/mod_ops_unittest.cc", |
| 473 | "base/multipart_unittest.cc", |
| 474 | "base/nat_unittest.cc", |
| 475 | "base/network_unittest.cc", |
| 476 | "base/onetimeevent_unittest.cc", |
| 477 | "base/optional_unittest.cc", |
| 478 | "base/optionsfile_unittest.cc", |
| 479 | "base/pathutils_unittest.cc", |
| 480 | "base/platform_thread_unittest.cc", |
| 481 | "base/profiler_unittest.cc", |
| 482 | "base/proxy_unittest.cc", |
| 483 | "base/proxydetect_unittest.cc", |
| 484 | "base/random_unittest.cc", |
sprang | cd349d9 | 2016-07-13 09:11:28 -0700 | [diff] [blame] | 485 | "base/rate_limiter_unittest.cc", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 486 | "base/rate_statistics_unittest.cc", |
| 487 | "base/ratelimiter_unittest.cc", |
| 488 | "base/ratetracker_unittest.cc", |
| 489 | "base/referencecountedsingletonfactory_unittest.cc", |
| 490 | "base/rollingaccumulator_unittest.cc", |
| 491 | "base/rtccertificate_unittest.cc", |
| 492 | "base/rtccertificategenerator_unittest.cc", |
| 493 | "base/scopedptrcollection_unittest.cc", |
perkj | 9c16fe8 | 2016-07-12 15:04:07 -0700 | [diff] [blame] | 494 | "base/sequenced_task_checker_unittest.cc", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 495 | "base/sha1digest_unittest.cc", |
| 496 | "base/sharedexclusivelock_unittest.cc", |
| 497 | "base/signalthread_unittest.cc", |
| 498 | "base/sigslot_unittest.cc", |
| 499 | "base/sigslottester.h", |
| 500 | "base/sigslottester.h.pump", |
| 501 | "base/stream_unittest.cc", |
| 502 | "base/stringencode_unittest.cc", |
| 503 | "base/stringutils_unittest.cc", |
| 504 | "base/swap_queue_unittest.cc", |
| 505 | |
| 506 | # TODO(ronghuawu): Reenable this test. |
| 507 | # "systeminfo_unittest.cc", |
| 508 | "base/task_queue_unittest.cc", |
| 509 | "base/task_unittest.cc", |
| 510 | "base/testclient_unittest.cc", |
| 511 | "base/thread_checker_unittest.cc", |
| 512 | "base/thread_unittest.cc", |
nisse | 191b359 | 2016-06-22 08:36:53 -0700 | [diff] [blame] | 513 | "base/timestampaligner_unittest.cc", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 514 | "base/timeutils_unittest.cc", |
| 515 | "base/urlencode_unittest.cc", |
| 516 | "base/versionparsing_unittest.cc", |
| 517 | |
| 518 | # TODO(ronghuawu): Reenable this test. |
| 519 | # "windowpicker_unittest.cc", |
| 520 | "p2p/base/dtlstransportchannel_unittest.cc", |
| 521 | "p2p/base/fakeportallocator.h", |
| 522 | "p2p/base/faketransportcontroller.h", |
| 523 | "p2p/base/p2ptransportchannel_unittest.cc", |
| 524 | "p2p/base/port_unittest.cc", |
| 525 | "p2p/base/portallocator_unittest.cc", |
| 526 | "p2p/base/pseudotcp_unittest.cc", |
| 527 | "p2p/base/relayport_unittest.cc", |
| 528 | "p2p/base/relayserver_unittest.cc", |
| 529 | "p2p/base/stun_unittest.cc", |
| 530 | "p2p/base/stunport_unittest.cc", |
| 531 | "p2p/base/stunrequest_unittest.cc", |
| 532 | "p2p/base/stunserver_unittest.cc", |
| 533 | "p2p/base/tcpport_unittest.cc", |
| 534 | "p2p/base/testrelayserver.h", |
| 535 | "p2p/base/teststunserver.h", |
| 536 | "p2p/base/testturnserver.h", |
| 537 | "p2p/base/transport_unittest.cc", |
| 538 | "p2p/base/transportcontroller_unittest.cc", |
| 539 | "p2p/base/transportdescriptionfactory_unittest.cc", |
| 540 | "p2p/base/turnport_unittest.cc", |
Taylor Brandstetter | 734262c | 2016-08-01 16:37:14 -0700 | [diff] [blame] | 541 | "p2p/base/turnserver_unittest.cc", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 542 | "p2p/client/basicportallocator_unittest.cc", |
| 543 | "p2p/stunprober/stunprober_unittest.cc", |
| 544 | ] |
| 545 | |
| 546 | if (is_linux) { |
| 547 | sources += [ |
| 548 | "base/latebindingsymboltable_unittest.cc", |
| 549 | |
| 550 | # TODO(ronghuawu): Reenable this test. |
| 551 | # "linux_unittest.cc", |
| 552 | "base/linuxfdwalk_unittest.cc", |
| 553 | ] |
| 554 | } |
| 555 | |
| 556 | if (is_win) { |
| 557 | sources += [ |
| 558 | "base/win32_unittest.cc", |
| 559 | "base/win32regkey_unittest.cc", |
| 560 | "base/win32window_unittest.cc", |
| 561 | "base/win32windowpicker_unittest.cc", |
| 562 | "base/winfirewall_unittest.cc", |
| 563 | ] |
| 564 | } |
| 565 | |
| 566 | if (is_mac) { |
| 567 | sources += [ "base/macutils_unittest.cc" ] |
| 568 | } |
| 569 | |
| 570 | if (is_posix) { |
| 571 | sources += [ |
| 572 | "base/ssladapter_unittest.cc", |
| 573 | "base/sslidentity_unittest.cc", |
| 574 | "base/sslstreamadapter_unittest.cc", |
| 575 | ] |
| 576 | } |
| 577 | if (is_ios || (is_mac && target_cpu != "x86")) { |
| 578 | defines = [ "CARBON_DEPRECATED=YES" ] |
| 579 | } |
| 580 | |
| 581 | if (rtc_use_quic) { |
| 582 | sources += [ |
| 583 | "p2p/quic/quicconnectionhelper_unittest.cc", |
| 584 | "p2p/quic/quicsession_unittest.cc", |
| 585 | "p2p/quic/quictransport_unittest.cc", |
| 586 | "p2p/quic/quictransportchannel_unittest.cc", |
| 587 | "p2p/quic/reliablequicstream_unittest.cc", |
| 588 | ] |
| 589 | } |
| 590 | |
| 591 | configs += [ |
| 592 | ":common_config", |
| 593 | ":rtc_unittests_config", |
| 594 | ] |
| 595 | public_configs = [ ":common_inherited_config" ] |
| 596 | |
| 597 | if (is_clang) { |
| 598 | # Suppress warnings from the Chromium Clang plugin. |
| 599 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 600 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 601 | } |
| 602 | |
| 603 | deps = [ |
| 604 | "base:rtc_base", |
kjellander | 82a9449 | 2016-06-12 22:12:01 -0700 | [diff] [blame] | 605 | "base:rtc_base_tests_utils", |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 606 | "base:rtc_task_queue", |
| 607 | "p2p:libstunprober", |
| 608 | "p2p:rtc_p2p", |
| 609 | "//testing/gmock", |
| 610 | "//testing/gtest", |
| 611 | ] |
| 612 | |
| 613 | if (is_android) { |
| 614 | deps += [ "//testing/android/native_test:native_test_support" ] |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 615 | shard_timeout = 900 |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 616 | } |
kjellander | 3bcedd3 | 2016-06-08 01:14:15 -0700 | [diff] [blame] | 617 | |
| 618 | if (is_ios || (is_mac && mac_deployment_target == "10.7")) { |
| 619 | deps += [ |
| 620 | "sdk:rtc_sdk_peerconnection_objc", |
| 621 | "system_wrappers:system_wrappers_default", |
| 622 | ] |
| 623 | sources += [ |
| 624 | "sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm", |
| 625 | "sdk/objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", |
| 626 | "sdk/objc/Framework/UnitTests/RTCIceCandidateTest.mm", |
| 627 | "sdk/objc/Framework/UnitTests/RTCIceServerTest.mm", |
| 628 | "sdk/objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", |
| 629 | "sdk/objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", |
| 630 | ] |
| 631 | |
| 632 | # TODO(tkchin): Cleanup this warning. |
| 633 | cflags = [ "-Wno-objc-property-no-attribute" ] |
| 634 | |
| 635 | # |-ObjC| flag needed to make sure category method implementations |
| 636 | # are included: |
| 637 | # https://developer.apple.com/library/mac/qa/qa1490/_index.html |
| 638 | ldflags = [ "-ObjC" ] |
| 639 | } |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 640 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 641 | |
charujain | 604fc11 | 2016-08-04 01:16:39 -0700 | [diff] [blame] | 642 | test("xmllite_xmpp_unittests") { |
| 643 | configs += [ |
| 644 | ":common_config", |
| 645 | ":rtc_unittests_config", |
| 646 | ] |
| 647 | public_configs = [ ":common_inherited_config" ] |
| 648 | |
| 649 | if (is_clang) { |
| 650 | # Suppress warnings from the Chromium Clang plugin. |
| 651 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 652 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 653 | } |
| 654 | |
| 655 | deps = [ |
| 656 | "base:rtc_base_tests_utils", |
| 657 | "libjingle/xmllite:rtc_xmllite", |
| 658 | "libjingle/xmpp:rtc_xmpp", |
| 659 | "//testing/gtest", |
| 660 | ] |
| 661 | |
| 662 | sources = [ |
| 663 | "libjingle/xmllite/qname_unittest.cc", |
| 664 | "libjingle/xmllite/xmlbuilder_unittest.cc", |
| 665 | "libjingle/xmllite/xmlelement_unittest.cc", |
| 666 | "libjingle/xmllite/xmlnsstack_unittest.cc", |
| 667 | "libjingle/xmllite/xmlparser_unittest.cc", |
| 668 | "libjingle/xmllite/xmlprinter_unittest.cc", |
| 669 | "libjingle/xmpp/fakexmppclient.h", |
| 670 | "libjingle/xmpp/hangoutpubsubclient_unittest.cc", |
| 671 | "libjingle/xmpp/jid_unittest.cc", |
| 672 | "libjingle/xmpp/mucroomconfigtask_unittest.cc", |
| 673 | "libjingle/xmpp/mucroomdiscoverytask_unittest.cc", |
| 674 | "libjingle/xmpp/mucroomlookuptask_unittest.cc", |
| 675 | "libjingle/xmpp/mucroomuniquehangoutidtask_unittest.cc", |
| 676 | "libjingle/xmpp/pingtask_unittest.cc", |
| 677 | "libjingle/xmpp/pubsubclient_unittest.cc", |
| 678 | "libjingle/xmpp/pubsubtasks_unittest.cc", |
| 679 | "libjingle/xmpp/util_unittest.cc", |
| 680 | "libjingle/xmpp/util_unittest.h", |
| 681 | "libjingle/xmpp/xmppengine_unittest.cc", |
| 682 | "libjingle/xmpp/xmpplogintask_unittest.cc", |
| 683 | "libjingle/xmpp/xmppstanzaparser_unittest.cc", |
| 684 | ] |
| 685 | } |
| 686 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 687 | # TODO(pbos): Rename test suite, this is no longer "just" for video targets. |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 688 | if (is_android || is_ios) { |
| 689 | video_engine_tests_resources = [ |
| 690 | "//resources/foreman_cif_short.yuv", |
| 691 | "//resources/voice_engine/audio_long16.pcm", |
| 692 | ] |
| 693 | } |
| 694 | |
| 695 | if (is_ios) { |
| 696 | bundle_data("video_engine_tests_bundle_data") { |
| 697 | testonly = true |
| 698 | sources = video_engine_tests_resources |
| 699 | outputs = [ |
| 700 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 701 | ] |
| 702 | } |
| 703 | } |
| 704 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 705 | test("video_engine_tests") { |
| 706 | testonly = true |
| 707 | deps = [ |
| 708 | "audio:audio_tests", |
| 709 | "call:call_tests", |
| 710 | "modules/video_capture", |
| 711 | "test:test_common", |
| 712 | "test:test_main", |
| 713 | "video:video_tests", |
| 714 | ] |
| 715 | if (is_clang) { |
| 716 | # Suppress warnings from the Chromium Clang plugin. |
| 717 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 718 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 719 | } |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 720 | if (is_android) { |
sakal | 010f092 | 2016-08-18 00:41:59 -0700 | [diff] [blame] | 721 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 722 | data = video_engine_tests_resources |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 723 | shard_timeout = 900 |
| 724 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 725 | |
| 726 | if (is_ios) { |
| 727 | deps += [ ":video_engine_tests_bundle_data" ] |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 728 | } |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 729 | } |
Peter Boström | ac968bd | 2016-06-27 19:31:39 +0200 | [diff] [blame] | 730 | |
ehmaldonado | 529f83c | 2016-07-27 08:14:32 -0700 | [diff] [blame] | 731 | source_set("video_quality_test") { |
| 732 | testonly = true |
| 733 | configs += [ ":common_config" ] |
| 734 | public_configs = [ ":common_inherited_config" ] |
| 735 | sources = [ |
| 736 | "video/video_quality_test.cc", |
| 737 | "video/video_quality_test.h", |
| 738 | ] |
| 739 | deps = [ |
| 740 | ":webrtc", |
| 741 | "system_wrappers", |
| 742 | "//testing/gtest", |
| 743 | ] |
| 744 | if (!is_android) { |
| 745 | deps += [ "modules/video_capture:video_capture_internal_impl" ] |
| 746 | } |
| 747 | if (is_clang) { |
| 748 | # Suppress warnings from the Chromium Clang plugin. |
| 749 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 750 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 751 | } |
| 752 | } |
| 753 | |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 754 | if (is_android || is_ios) { |
| 755 | webrtc_perf_tests_resources = [ |
| 756 | "//resources/audio_coding/speech_mono_16kHz.pcm", |
| 757 | "//resources/audio_coding/testfile32kHz.pcm", |
| 758 | "//resources/ConferenceMotion_1280_720_50.yuv", |
| 759 | "//resources/difficult_photo_1850_1110.yuv", |
| 760 | "//resources/foreman_cif.yuv", |
| 761 | "//resources/google-wifi-3mbps.rx", |
| 762 | "//resources/paris_qcif.yuv", |
| 763 | "//resources/photo_1850_1110.yuv", |
| 764 | "//resources/presentation_1850_1110.yuv", |
| 765 | "//resources/verizon4g-downlink.rx", |
| 766 | "//resources/voice_engine/audio_long16.pcm", |
| 767 | "//resources/web_screenshot_1850_1110.yuv", |
| 768 | ] |
| 769 | } |
| 770 | |
| 771 | if (is_ios) { |
| 772 | bundle_data("webrtc_perf_tests_bundle_data") { |
| 773 | testonly = true |
| 774 | sources = webrtc_perf_tests_resources |
| 775 | outputs = [ |
| 776 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 777 | ] |
| 778 | } |
| 779 | } |
| 780 | |
ehmaldonado | 529f83c | 2016-07-27 08:14:32 -0700 | [diff] [blame] | 781 | test("webrtc_perf_tests") { |
| 782 | testonly = true |
| 783 | configs += [ |
| 784 | ":common_config", |
| 785 | ":rtc_unittests_config", |
| 786 | ] |
| 787 | public_configs = [ ":common_inherited_config" ] |
| 788 | sources = [ |
| 789 | "call/call_perf_tests.cc", |
| 790 | "call/rampup_tests.cc", |
| 791 | "call/rampup_tests.h", |
| 792 | "modules/audio_coding/neteq/test/neteq_performance_unittest.cc", |
| 793 | "modules/audio_processing/audio_processing_performance_unittest.cc", |
| 794 | "modules/audio_processing/level_controller/level_controller_complexity_unittest.cc", |
| 795 | "modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc", |
| 796 | "video/full_stack.cc", |
| 797 | ] |
| 798 | deps = [ |
| 799 | ":video_quality_test", |
| 800 | ":webrtc", |
| 801 | "modules/audio_coding:neteq_test_support", |
| 802 | "modules/audio_processing", |
| 803 | "modules/audio_processing:audioproc_test_utils", |
| 804 | "modules/remote_bitrate_estimator:bwe_simulator", |
| 805 | "modules/rtp_rtcp", |
| 806 | "test:channel_transport", |
| 807 | "test:test_common", |
| 808 | "test:test_main", |
| 809 | "test:test_renderer", |
| 810 | "voice_engine", |
| 811 | "//testing/gmock", |
| 812 | "//testing/gtest", |
| 813 | ] |
| 814 | if (is_android) { |
| 815 | deps += [ "//testing/android/native_test:native_test_native_code" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 816 | data = webrtc_perf_tests_resources |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 817 | shard_timeout = 2700 |
ehmaldonado | 529f83c | 2016-07-27 08:14:32 -0700 | [diff] [blame] | 818 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame^] | 819 | if (is_ios) { |
| 820 | deps += [ ":webrtc_perf_tests_bundle_data" ] |
| 821 | } |
ehmaldonado | 529f83c | 2016-07-27 08:14:32 -0700 | [diff] [blame] | 822 | if (is_clang) { |
| 823 | # Suppress warnings from the Chromium Clang plugin. |
| 824 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 825 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 826 | } |
| 827 | } |
| 828 | |
Peter Boström | ac968bd | 2016-06-27 19:31:39 +0200 | [diff] [blame] | 829 | test("webrtc_nonparallel_tests") { |
| 830 | testonly = true |
| 831 | configs += [ |
| 832 | ":common_config", |
| 833 | ":rtc_unittests_config", |
| 834 | ] |
| 835 | public_configs = [ ":common_inherited_config" ] |
| 836 | sources = [ |
| 837 | "base/nullsocketserver_unittest.cc", |
danilchap | b7b9dca | 2016-08-05 05:55:43 -0700 | [diff] [blame] | 838 | "base/physicalsocketserver_unittest.cc", |
| 839 | "base/socket_unittest.cc", |
| 840 | "base/socket_unittest.h", |
Peter Boström | ac968bd | 2016-06-27 19:31:39 +0200 | [diff] [blame] | 841 | "base/socketaddress_unittest.cc", |
| 842 | "base/virtualsocket_unittest.cc", |
| 843 | ] |
| 844 | deps = [ |
| 845 | "base:rtc_base", |
| 846 | "base:rtc_base_tests_utils", |
| 847 | "//testing/gtest", |
| 848 | ] |
| 849 | if (is_win) { |
danilchap | b7b9dca | 2016-08-05 05:55:43 -0700 | [diff] [blame] | 850 | sources += [ "base/win32socketserver_unittest.cc" ] |
Peter Boström | ac968bd | 2016-06-27 19:31:39 +0200 | [diff] [blame] | 851 | } |
| 852 | if (is_android) { |
| 853 | deps += [ "//testing/android/native_test:native_test_support" ] |
sakal | 714dd4e | 2016-08-15 02:29:11 -0700 | [diff] [blame] | 854 | shard_timeout = 900 |
Peter Boström | ac968bd | 2016-06-27 19:31:39 +0200 | [diff] [blame] | 855 | } |
| 856 | |
| 857 | if (is_mac) { |
| 858 | sources += [ "base/macsocketserver_unittest.cc" ] |
| 859 | } |
| 860 | if (is_ios || (is_mac && target_cpu != "x86")) { |
| 861 | defines = [ "CARBON_DEPRECATED=YES" ] |
| 862 | } |
| 863 | if (is_clang) { |
| 864 | # Suppress warnings from the Chromium Clang plugin. |
| 865 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 866 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 867 | } |
| 868 | } |
kjellander@webrtc.org | 3ee5614 | 2016-06-03 15:57:02 +0200 | [diff] [blame] | 869 | } |