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