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 | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 9 | import("//build/config/ui.gni") |
Robin Raymond | ce1b140 | 2018-11-22 20:10:11 -0500 | [diff] [blame] | 10 | import("../webrtc.gni") |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 11 | if (is_android) { |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 14 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 15 | group("test") { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 16 | testonly = true |
| 17 | |
| 18 | deps = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 19 | ":rtp_test_utils", |
| 20 | ":test_common", |
| 21 | ":test_renderer", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 22 | ":test_support", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 23 | ":video_test_common", |
| 24 | ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 25 | |
oprypin | fbbba3f | 2017-09-25 08:34:41 -0700 | [diff] [blame] | 26 | if (rtc_include_tests) { |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 27 | deps += [ |
| 28 | ":test_main", |
| 29 | ":test_support_unittests", |
Sebastian Jansson | 98b07e9 | 2018-09-27 13:47:01 +0200 | [diff] [blame] | 30 | "scenario/scenario_tests", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 31 | ] |
| 32 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 33 | } |
| 34 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 35 | rtc_source_set("video_test_common") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 36 | visibility = [ "*" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 37 | testonly = true |
| 38 | sources = [ |
| 39 | "fake_texture_frame.cc", |
| 40 | "fake_texture_frame.h", |
| 41 | "frame_generator.cc", |
| 42 | "frame_generator.h", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 43 | "frame_generator_capturer.cc", |
| 44 | "frame_generator_capturer.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 45 | "frame_utils.cc", |
| 46 | "frame_utils.h", |
Sebastian Jansson | f1f363f | 2018-08-13 14:24:58 +0200 | [diff] [blame] | 47 | "test_video_capturer.cc", |
| 48 | "test_video_capturer.h", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 49 | "vcm_capturer.cc", |
| 50 | "vcm_capturer.h", |
mflodman | 351424e | 2017-08-10 02:43:14 -0700 | [diff] [blame] | 51 | "video_codec_settings.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 52 | ] |
| 53 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 54 | if (!build_with_chromium && is_clang) { |
| 55 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 56 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 60 | "..:webrtc_common", |
Patrik Höglund | 9e19403 | 2018-01-04 15:58:20 +0100 | [diff] [blame] | 61 | "../api:libjingle_peerconnection_api", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 62 | "../api/video:video_frame", |
Emircan Uysaler | 0823eec | 2018-07-13 17:10:00 -0700 | [diff] [blame] | 63 | "../api/video:video_frame_i010", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 64 | "../api/video:video_frame_i420", |
mflodman | 351424e | 2017-08-10 02:43:14 -0700 | [diff] [blame] | 65 | "../api/video_codecs:video_codecs_api", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 66 | "../call:video_stream_api", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 67 | "../common_video", |
sprang | c5d62e2 | 2017-04-02 23:53:04 -0700 | [diff] [blame] | 68 | "../media:rtc_media_base", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 69 | "../modules/video_capture:video_capture_module", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 70 | "../rtc_base:checks", |
Patrik Höglund | 76df0df | 2017-12-19 11:50:21 +0100 | [diff] [blame] | 71 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 72 | "../rtc_base:rtc_task_queue", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 73 | "../system_wrappers", |
Danil Chapovalov | abd4273 | 2018-09-10 14:07:45 +0200 | [diff] [blame] | 74 | "//third_party/abseil-cpp/absl/memory", |
Danil Chapovalov | 431abd9 | 2018-06-18 12:54:17 +0200 | [diff] [blame] | 75 | "//third_party/abseil-cpp/absl/types:optional", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 76 | ] |
| 77 | } |
| 78 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 79 | rtc_source_set("rtp_test_utils") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 80 | testonly = true |
| 81 | sources = [ |
| 82 | "rtcp_packet_parser.cc", |
| 83 | "rtcp_packet_parser.h", |
| 84 | "rtp_file_reader.cc", |
| 85 | "rtp_file_reader.h", |
| 86 | "rtp_file_writer.cc", |
| 87 | "rtp_file_writer.h", |
| 88 | ] |
| 89 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 90 | if (!build_with_chromium && is_clang) { |
| 91 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 92 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | deps = [ |
| 96 | "..:webrtc_common", |
kwiberg | 529662a | 2017-09-04 05:43:17 -0700 | [diff] [blame] | 97 | "../api:array_view", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 98 | "../modules/rtp_rtcp", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 99 | "../modules/rtp_rtcp:rtp_rtcp_format", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 100 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 101 | "../rtc_base:rtc_base_approved", |
Niels Möller | a12c42a | 2018-07-25 16:05:48 +0200 | [diff] [blame] | 102 | "../rtc_base/system:arch", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 103 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 104 | ] |
| 105 | } |
| 106 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 107 | rtc_source_set("field_trial") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 108 | visibility = [ "*" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 109 | testonly = true |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 110 | sources = [ |
| 111 | "field_trial.cc", |
| 112 | "field_trial.h", |
| 113 | ] |
| 114 | |
| 115 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 116 | "..:webrtc_common", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 117 | "../system_wrappers:field_trial", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 118 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 119 | } |
| 120 | |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 121 | rtc_source_set("perf_test") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 122 | visibility = [ "*" ] |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 123 | sources = [ |
| 124 | "testsupport/perf_test.cc", |
| 125 | "testsupport/perf_test.h", |
| 126 | ] |
| 127 | deps = [ |
| 128 | "..:webrtc_common", |
| 129 | "../api:array_view", |
Oleh Prypin | d136b28 | 2018-10-03 13:53:44 +0200 | [diff] [blame] | 130 | "../rtc_base:checks", |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 131 | "../rtc_base:rtc_base_approved", |
| 132 | ] |
| 133 | } |
| 134 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 135 | if (is_ios) { |
| 136 | rtc_source_set("test_support_objc") { |
| 137 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 138 | visibility = [ ":test_support" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 139 | sources = [ |
Artem Titarenko | 34fc346 | 2018-11-06 12:29:29 +0100 | [diff] [blame] | 140 | "ios/coverage_util_ios.h", |
| 141 | "ios/coverage_util_ios.mm", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 142 | "ios/test_support.h", |
| 143 | "ios/test_support.mm", |
| 144 | ] |
denicija | d207a39 | 2017-09-11 06:43:28 -0700 | [diff] [blame] | 145 | deps = [ |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 146 | ":perf_test", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 147 | "../sdk:helpers_objc", |
denicija | d207a39 | 2017-09-11 06:43:28 -0700 | [diff] [blame] | 148 | ] |
Artem Titarenko | 34fc346 | 2018-11-06 12:29:29 +0100 | [diff] [blame] | 149 | configs += [ ":test_support_objc_config" ] |
| 150 | } |
| 151 | |
| 152 | config("test_support_objc_config") { |
| 153 | defines = [] |
| 154 | |
| 155 | if (use_clang_coverage) { |
| 156 | defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ] |
| 157 | } |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 158 | } |
| 159 | } |
| 160 | |
Patrik Höglund | 34924c2 | 2018-01-19 09:11:07 +0100 | [diff] [blame] | 161 | config("suppress_warning_4373") { |
| 162 | if (is_win) { |
| 163 | cflags = [ |
| 164 | # MSVC has a bug which generates this warning when using mocks; see the |
| 165 | # section on warning 4373 in he googlemock FAQ. This warning isn't the |
| 166 | # least relevant for us, anyway. |
| 167 | "/wd4373", |
| 168 | ] |
| 169 | } |
| 170 | } |
| 171 | |
Sebastian Jansson | 2afd281 | 2018-08-23 14:44:05 +0200 | [diff] [blame] | 172 | config("test_main_direct_config") { |
| 173 | visibility = [ ":*" ] |
| 174 | defines = [ "UNIT_TEST" ] |
| 175 | } |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 176 | rtc_source_set("test_support") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 177 | visibility = [ "*" ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 178 | testonly = true |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 179 | |
Mirko Bonadei | 65ce311 | 2018-01-26 11:57:47 +0100 | [diff] [blame] | 180 | all_dependent_configs = [ |
| 181 | ":suppress_warning_4373", |
| 182 | "//third_party/googletest:gmock_config", |
| 183 | "//third_party/googletest:gtest_config", |
| 184 | ] |
Patrik Höglund | 34924c2 | 2018-01-19 09:11:07 +0100 | [diff] [blame] | 185 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 186 | sources = [ |
| 187 | "gmock.h", |
| 188 | "gtest.h", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 189 | ] |
| 190 | |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 191 | public_deps = [] |
Kári Tristan Helgason | e2baffb | 2017-06-09 10:31:58 +0200 | [diff] [blame] | 192 | if (is_ios) { |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 193 | public_deps += [ ":test_support_objc" ] |
Kári Tristan Helgason | e2baffb | 2017-06-09 10:31:58 +0200 | [diff] [blame] | 194 | } |
| 195 | |
Sebastian Jansson | 2afd281 | 2018-08-23 14:44:05 +0200 | [diff] [blame] | 196 | public_configs = [ ":test_main_direct_config" ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 197 | deps = [ |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 198 | "../rtc_base:rtc_base_approved", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 199 | "//testing/gmock", |
| 200 | "//testing/gtest", |
| 201 | ] |
| 202 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 203 | if (!build_with_chromium && is_clang) { |
| 204 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 205 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 206 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 207 | } |
| 208 | |
oprypin | fbbba3f | 2017-09-25 08:34:41 -0700 | [diff] [blame] | 209 | if (rtc_include_tests) { |
Artem Titov | 40a7a35 | 2018-10-15 15:25:34 +0200 | [diff] [blame] | 210 | rtc_source_set("test_main_lib") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 211 | visibility = [ "*" ] |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 212 | testonly = true |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 213 | sources = [ |
Artem Titov | 40a7a35 | 2018-10-15 15:25:34 +0200 | [diff] [blame] | 214 | "test_main_lib.cc", |
| 215 | "test_main_lib.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 216 | ] |
| 217 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 218 | deps = [ |
| 219 | ":field_trial", |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 220 | ":perf_test", |
Artem Titov | 40a7a35 | 2018-10-15 15:25:34 +0200 | [diff] [blame] | 221 | ":test_support", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 222 | "../rtc_base:checks", |
Niels Möller | 8909a63 | 2018-09-06 08:42:44 +0200 | [diff] [blame] | 223 | "../rtc_base:rtc_base", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 224 | "../system_wrappers:field_trial", |
| 225 | "../system_wrappers:metrics", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 226 | "//testing/gtest", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 227 | "//third_party/abseil-cpp/absl/memory", |
Patrik Höglund | 7730193 | 2018-10-09 15:09:51 +0200 | [diff] [blame] | 228 | |
| 229 | # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on |
| 230 | # Android, where it's replaced by an internal version of fileutils that |
| 231 | # has a certain flag. Remove this once the internal fileutils has been |
| 232 | # eliminated. |
| 233 | "../test:fileutils", |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 234 | ] |
| 235 | } |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 236 | |
Artem Titov | 40a7a35 | 2018-10-15 15:25:34 +0200 | [diff] [blame] | 237 | rtc_source_set("test_main") { |
| 238 | visibility = [ "*" ] |
| 239 | testonly = true |
| 240 | sources = [ |
| 241 | "test_main.cc", |
| 242 | ] |
| 243 | |
| 244 | deps = [ |
| 245 | ":test_main_lib", |
| 246 | ] |
| 247 | } |
| 248 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 249 | rtc_source_set("video_test_support") { |
| 250 | testonly = true |
| 251 | |
| 252 | sources = [ |
| 253 | "testsupport/frame_reader.h", |
| 254 | "testsupport/frame_writer.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 255 | "testsupport/mock/mock_frame_reader.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 256 | "testsupport/y4m_frame_writer.cc", |
| 257 | "testsupport/yuv_frame_reader.cc", |
| 258 | "testsupport/yuv_frame_writer.cc", |
| 259 | ] |
| 260 | |
| 261 | deps = [ |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 262 | ":fileutils", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 263 | ":test_support", |
| 264 | ":video_test_common", |
| 265 | "..:webrtc_common", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 266 | "../api/video:video_frame", |
| 267 | "../api/video:video_frame_i420", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 268 | "../common_video", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 269 | "../rtc_base:checks", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 270 | "../rtc_base:rtc_base_approved", |
| 271 | "../system_wrappers", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 272 | "//testing/gtest", |
Mirko Bonadei | 401d056 | 2017-12-14 11:24:00 +0100 | [diff] [blame] | 273 | "//third_party/libyuv", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 274 | ] |
| 275 | |
| 276 | if (!is_ios) { |
| 277 | deps += [ "//third_party:jpeg" ] |
| 278 | sources += [ "testsupport/jpeg_frame_writer.cc" ] |
| 279 | } else { |
| 280 | sources += [ "testsupport/jpeg_frame_writer_ios.cc" ] |
| 281 | } |
| 282 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 283 | if (!build_with_chromium && is_clang) { |
| 284 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 285 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 286 | } |
| 287 | |
| 288 | if (is_android) { |
| 289 | deps += [ "//base:base" ] |
| 290 | } |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 291 | } |
| 292 | |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 293 | rtc_source_set("test_support_test_artifacts") { |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 294 | testonly = true |
| 295 | sources = [ |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 296 | "testsupport/test_artifacts.cc", |
| 297 | "testsupport/test_artifacts.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 298 | ] |
| 299 | deps = [ |
| 300 | ":fileutils", |
| 301 | "../rtc_base:rtc_base_approved", |
| 302 | ] |
| 303 | } |
| 304 | |
| 305 | test_support_unittests_resources = [ |
| 306 | "../resources/foreman_cif_short.yuv", |
| 307 | "../resources/video_coding/frame-ethernet-ii.pcap", |
| 308 | "../resources/video_coding/frame-loopback.pcap", |
| 309 | "../resources/video_coding/pltype103.rtp", |
| 310 | "../resources/video_coding/pltype103_header_only.rtp", |
| 311 | "../resources/video_coding/ssrcs-2.pcap", |
| 312 | "../resources/video_coding/ssrcs-3.pcap", |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 313 | ] |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 314 | |
| 315 | if (is_ios) { |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 316 | bundle_data("test_support_unittests_bundle_data") { |
| 317 | testonly = true |
| 318 | sources = test_support_unittests_resources |
| 319 | outputs = [ |
| 320 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 321 | ] |
| 322 | } |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 323 | } |
| 324 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 325 | rtc_test("test_support_unittests") { |
| 326 | deps = [ |
Sebastian Jansson | 0940811 | 2018-04-24 14:41:22 +0200 | [diff] [blame] | 327 | ":direct_transport", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 328 | ":fake_video_codecs", |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 329 | ":fileutils", |
Mirko Bonadei | 4639999 | 2018-08-22 15:32:38 +0200 | [diff] [blame] | 330 | ":fileutils_unittests", |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 331 | ":perf_test", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 332 | ":rtp_test_utils", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 333 | ":test_common", |
Mirko Bonadei | 9098b30 | 2018-04-06 10:48:10 +0200 | [diff] [blame] | 334 | ":test_main", |
| 335 | ":test_support", |
| 336 | ":test_support_test_artifacts", |
| 337 | ":video_test_common", |
| 338 | ":video_test_support", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 339 | "../api:create_simulcast_test_fixture_api", |
| 340 | "../api:simulcast_test_fixture_api", |
Danil Chapovalov | 99b71df | 2018-10-26 15:57:48 +0200 | [diff] [blame] | 341 | "../api/test/video:function_video_factory", |
Jiawei Ou | c2ebe21 | 2018-11-08 10:02:56 -0800 | [diff] [blame] | 342 | "../api/video:builtin_video_bitrate_allocator_factory", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 343 | "../api/video:video_frame", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 344 | "../api/video:video_frame_i420", |
Mirko Bonadei | 9098b30 | 2018-04-06 10:48:10 +0200 | [diff] [blame] | 345 | "../modules/rtp_rtcp:rtp_rtcp", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 346 | "../modules/video_capture", |
| 347 | "../modules/video_coding:simulcast_test_fixture_impl", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 348 | "../rtc_base:rtc_base_approved", |
Mirko Bonadei | 9098b30 | 2018-04-06 10:48:10 +0200 | [diff] [blame] | 349 | "../test:single_threaded_task_queue", |
Sebastian Jansson | 98b07e9 | 2018-09-27 13:47:01 +0200 | [diff] [blame] | 350 | "scenario:scenario_unittests", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 351 | "//testing/gmock", |
Mirko Bonadei | 9098b30 | 2018-04-06 10:48:10 +0200 | [diff] [blame] | 352 | "//testing/gtest", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 353 | "//third_party/abseil-cpp/absl/memory", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 354 | ] |
| 355 | sources = [ |
Sebastian Jansson | 0940811 | 2018-04-24 14:41:22 +0200 | [diff] [blame] | 356 | "direct_transport_unittest.cc", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 357 | "fake_vp8_encoder_unittest.cc", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 358 | "frame_generator_unittest.cc", |
| 359 | "rtp_file_reader_unittest.cc", |
| 360 | "rtp_file_writer_unittest.cc", |
| 361 | "single_threaded_task_queue_unittest.cc", |
| 362 | "testsupport/always_passing_unittest.cc", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 363 | "testsupport/perf_test_unittest.cc", |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 364 | "testsupport/test_artifacts_unittest.cc", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 365 | "testsupport/y4m_frame_writer_unittest.cc", |
| 366 | "testsupport/yuv_frame_reader_unittest.cc", |
| 367 | "testsupport/yuv_frame_writer_unittest.cc", |
| 368 | ] |
| 369 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 370 | if (!build_with_chromium && is_clang) { |
| 371 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 372 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 373 | } |
| 374 | |
| 375 | data = test_support_unittests_resources |
| 376 | if (is_android) { |
| 377 | deps += [ "//testing/android/native_test:native_test_support" ] |
| 378 | shard_timeout = 900 |
| 379 | } |
| 380 | |
| 381 | if (is_ios) { |
| 382 | deps += [ ":test_support_unittests_bundle_data" ] |
| 383 | } |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 384 | |
Mirko Bonadei | 9098b30 | 2018-04-06 10:48:10 +0200 | [diff] [blame] | 385 | if (!is_android && !build_with_chromium) { |
| 386 | # This is needed in order to avoid: |
| 387 | # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create |
| 388 | deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 389 | } |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 390 | } |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 391 | } |
| 392 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 393 | if (is_ios) { |
Patrik Höglund | 8434aeb | 2018-10-05 14:52:11 +0200 | [diff] [blame] | 394 | rtc_source_set("fileutils_ios_objc") { |
Artem Titov | 8f726be | 2018-10-23 15:50:10 +0200 | [diff] [blame] | 395 | visibility = [ |
| 396 | ":fileutils", |
| 397 | ":fileutils_override_impl", |
| 398 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 399 | sources = [ |
Patrik Höglund | 8434aeb | 2018-10-05 14:52:11 +0200 | [diff] [blame] | 400 | "testsupport/iosfileutils.h", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 401 | "testsupport/iosfileutils.mm", |
| 402 | ] |
| 403 | deps = [ |
| 404 | "..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 405 | "../rtc_base:checks", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 406 | "../rtc_base:rtc_base_approved", |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 407 | "../sdk:helpers_objc", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 408 | ] |
| 409 | } |
| 410 | } |
| 411 | |
Patrik Höglund | 8434aeb | 2018-10-05 14:52:11 +0200 | [diff] [blame] | 412 | if (is_mac) { |
| 413 | rtc_source_set("fileutils_mac_objc") { |
Artem Titov | 8f726be | 2018-10-23 15:50:10 +0200 | [diff] [blame] | 414 | visibility = [ |
| 415 | ":fileutils", |
| 416 | ":fileutils_override_impl", |
| 417 | ] |
Patrik Höglund | 8434aeb | 2018-10-05 14:52:11 +0200 | [diff] [blame] | 418 | sources = [ |
| 419 | "testsupport/macfileutils.h", |
| 420 | "testsupport/macfileutils.mm", |
| 421 | ] |
| 422 | deps = [ |
| 423 | "../rtc_base:checks", |
| 424 | ] |
| 425 | } |
| 426 | } |
| 427 | |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 428 | rtc_source_set("fileutils") { |
| 429 | testonly = true |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 430 | visibility = [ "*" ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 431 | sources = [ |
| 432 | "testsupport/fileutils.cc", |
| 433 | "testsupport/fileutils.h", |
| 434 | ] |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 435 | deps = [ |
Artem Titov | 8f726be | 2018-10-23 15:50:10 +0200 | [diff] [blame] | 436 | ":fileutils_override_api", |
| 437 | ":fileutils_override_impl", |
| 438 | "..:webrtc_common", |
| 439 | "../rtc_base:checks", |
| 440 | "../rtc_base:rtc_base_approved", |
| 441 | "../rtc_base/system:arch", |
| 442 | "//third_party/abseil-cpp/absl/types:optional", |
| 443 | ] |
| 444 | if (is_ios) { |
| 445 | deps += [ ":fileutils_ios_objc" ] |
| 446 | } |
| 447 | if (is_mac) { |
| 448 | deps += [ ":fileutils_mac_objc" ] |
| 449 | } |
| 450 | if (is_win) { |
| 451 | deps += [ "../rtc_base:rtc_base" ] |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | # We separate header into own target to make it possible for downstream |
| 456 | # projects to override implementation. |
| 457 | rtc_source_set("fileutils_override_api") { |
| 458 | testonly = true |
| 459 | sources = [ |
| 460 | "testsupport/fileutils_override.h", |
| 461 | ] |
| 462 | } |
| 463 | |
| 464 | rtc_source_set("fileutils_override_impl") { |
| 465 | testonly = true |
| 466 | visibility = [ ":fileutils" ] |
| 467 | sources = [ |
| 468 | "testsupport/fileutils_override.cc", |
| 469 | ] |
| 470 | deps = [ |
| 471 | ":fileutils_override_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 472 | "..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 473 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 474 | "../rtc_base:rtc_base_approved", |
Niels Möller | a12c42a | 2018-07-25 16:05:48 +0200 | [diff] [blame] | 475 | "../rtc_base/system:arch", |
Danil Chapovalov | 431abd9 | 2018-06-18 12:54:17 +0200 | [diff] [blame] | 476 | "//third_party/abseil-cpp/absl/types:optional", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 477 | ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 478 | if (is_ios) { |
Patrik Höglund | 8434aeb | 2018-10-05 14:52:11 +0200 | [diff] [blame] | 479 | deps += [ ":fileutils_ios_objc" ] |
| 480 | } |
| 481 | if (is_mac) { |
| 482 | deps += [ ":fileutils_mac_objc" ] |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 483 | } |
| 484 | if (is_win) { |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 485 | deps += [ "../rtc_base:rtc_base" ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 486 | } |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 487 | } |
| 488 | |
| 489 | rtc_source_set("run_test") { |
| 490 | testonly = true |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 491 | if (is_mac) { |
| 492 | public_deps = [ |
| 493 | ":run_test_objc", |
| 494 | ] |
| 495 | } else { |
| 496 | public_deps = [ |
| 497 | ":run_test_generic", |
| 498 | ] |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | rtc_source_set("run_test_interface") { |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 503 | sources = [ |
| 504 | "run_test.h", |
| 505 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 506 | } |
| 507 | |
| 508 | if (is_mac) { |
| 509 | rtc_source_set("run_test_objc") { |
| 510 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 511 | visibility = [ ":run_test" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 512 | sources = [ |
| 513 | "mac/run_test.mm", |
| 514 | ] |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 515 | deps = [ |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 516 | ":run_test_interface", |
| 517 | ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 518 | } |
| 519 | } |
| 520 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 521 | rtc_source_set("run_test_generic") { |
| 522 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 523 | visibility = [ ":run_test" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 524 | sources = [ |
| 525 | "run_test.cc", |
| 526 | ] |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 527 | deps = [ |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 528 | ":run_test_interface", |
| 529 | ] |
| 530 | } |
| 531 | |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 532 | rtc_source_set("fileutils_unittests") { |
| 533 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 534 | visibility = [ ":*" ] # Only targets in this file can depend on this. |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 535 | sources = [ |
| 536 | "testsupport/fileutils_unittest.cc", |
| 537 | ] |
| 538 | deps = [ |
| 539 | ":fileutils", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 540 | ":test_support", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 541 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 542 | "../rtc_base:rtc_base_approved", |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 543 | "//testing/gtest", |
Danil Chapovalov | 431abd9 | 2018-06-18 12:54:17 +0200 | [diff] [blame] | 544 | "//third_party/abseil-cpp/absl/types:optional", |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 545 | ] |
| 546 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 547 | |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 548 | rtc_source_set("direct_transport") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 549 | visibility = [ "*" ] |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 550 | testonly = true |
| 551 | sources = [ |
| 552 | "direct_transport.cc", |
| 553 | "direct_transport.h", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 554 | ] |
| 555 | if (!build_with_chromium && is_clang) { |
| 556 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 557 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 558 | } |
| 559 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 560 | "..:webrtc_common", |
Artem Titov | 46c4e60 | 2018-08-17 14:26:54 +0200 | [diff] [blame] | 561 | "../api:simulated_network_api", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 562 | "../api:transport_api", |
Mirko Bonadei | a0e1a55 | 2017-12-04 10:50:51 +0100 | [diff] [blame] | 563 | "../call:call_interfaces", |
Artem Titov | 46c4e60 | 2018-08-17 14:26:54 +0200 | [diff] [blame] | 564 | "../call:simulated_packet_receiver", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 565 | "../modules/rtp_rtcp", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 566 | "../rtc_base:rtc_base_approved", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 567 | "../rtc_base:sequenced_task_checker", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 568 | "../system_wrappers", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 569 | "//third_party/abseil-cpp/absl/memory", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 570 | ] |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 571 | public_deps = [ |
| 572 | ":single_threaded_task_queue", |
Erik Språng | 0970851 | 2018-03-14 15:16:50 +0100 | [diff] [blame] | 573 | "../call:fake_network", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 574 | ] |
| 575 | } |
| 576 | |
| 577 | rtc_source_set("single_threaded_task_queue") { |
| 578 | testonly = true |
| 579 | sources = [ |
| 580 | "single_threaded_task_queue.cc", |
| 581 | "single_threaded_task_queue.h", |
| 582 | ] |
| 583 | deps = [ |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 584 | "../rtc_base:checks", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 585 | "../rtc_base:rtc_base_approved", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 586 | "//third_party/abseil-cpp/absl/memory", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 587 | ] |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 588 | } |
| 589 | |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 590 | rtc_source_set("fake_video_codecs") { |
| 591 | testonly = true |
| 592 | visibility = [ "*" ] |
| 593 | sources = [ |
| 594 | "configurable_frame_size_encoder.cc", |
| 595 | "configurable_frame_size_encoder.h", |
| 596 | "fake_decoder.cc", |
| 597 | "fake_decoder.h", |
| 598 | "fake_encoder.cc", |
| 599 | "fake_encoder.h", |
Per Kjellander | 841c912 | 2018-10-04 18:40:28 +0200 | [diff] [blame] | 600 | "fake_vp8_decoder.cc", |
| 601 | "fake_vp8_decoder.h", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 602 | "fake_vp8_encoder.cc", |
| 603 | "fake_vp8_encoder.h", |
| 604 | ] |
| 605 | if (!build_with_chromium && is_clang) { |
| 606 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 607 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 608 | } |
| 609 | deps = [ |
| 610 | "..:webrtc_common", |
Niels Möller | 4dc66c5 | 2018-10-05 14:17:58 +0200 | [diff] [blame] | 611 | "../api/video:encoded_image", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 612 | "../api/video:video_bitrate_allocation", |
| 613 | "../api/video:video_frame", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 614 | "../api/video:video_frame_i420", |
Erik Språng | 4529fbc | 2018-10-12 10:30:31 +0200 | [diff] [blame] | 615 | "../api/video_codecs:create_vp8_temporal_layers", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 616 | "../api/video_codecs:video_codecs_api", |
| 617 | "../common_video:common_video", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 618 | "../modules:module_api", |
| 619 | "../modules/video_coding:codec_globals_headers", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 620 | "../modules/video_coding:video_codec_interface", |
| 621 | "../modules/video_coding:video_coding_utility", |
| 622 | "../modules/video_coding:webrtc_h264", |
| 623 | "../modules/video_coding:webrtc_vp8", |
| 624 | "../modules/video_coding:webrtc_vp9", |
| 625 | "../rtc_base:checks", |
| 626 | "../rtc_base:rtc_base_approved", |
| 627 | "../rtc_base:rtc_task_queue", |
| 628 | "../rtc_base:sequenced_task_checker", |
| 629 | "../system_wrappers", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 630 | "//third_party/abseil-cpp/absl/types:optional", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 631 | ] |
| 632 | } |
| 633 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 634 | rtc_source_set("test_common") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 635 | testonly = true |
| 636 | sources = [ |
| 637 | "call_test.cc", |
| 638 | "call_test.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 639 | "constants.cc", |
| 640 | "constants.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 641 | "drifting_clock.cc", |
| 642 | "drifting_clock.h", |
| 643 | "encoder_settings.cc", |
| 644 | "encoder_settings.h", |
sakal | 55d932b | 2016-09-30 06:19:08 -0700 | [diff] [blame] | 645 | "fake_videorenderer.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 646 | "layer_filtering_transport.cc", |
| 647 | "layer_filtering_transport.h", |
Danil Chapovalov | dd7e284 | 2018-03-09 15:37:03 +0000 | [diff] [blame] | 648 | "mock_transport.cc", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 649 | "mock_transport.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 650 | "null_transport.cc", |
| 651 | "null_transport.h", |
| 652 | "rtp_rtcp_observer.h", |
| 653 | "statistics.cc", |
| 654 | "statistics.h", |
Niels Möller | cbcbc22 | 2018-09-28 09:07:24 +0200 | [diff] [blame] | 655 | "video_decoder_proxy_factory.h", |
| 656 | "video_encoder_proxy_factory.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 657 | ] |
Robin Raymond | ce1b140 | 2018-11-22 20:10:11 -0500 | [diff] [blame] | 658 | if (current_os != "winuwp") { |
| 659 | # The filtering of *_win.cc is not done for WinUWP (intentionally) as |
| 660 | # most _win.cc files are compatible with WinUWP. However, the |
| 661 | # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus |
| 662 | # WinUWP uses the generic runloop as defined for non-Windows targets. |
| 663 | sources += [ "win/run_loop_win.cc" ] |
| 664 | } |
| 665 | if (!is_win || current_os == "winuwp") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 666 | sources += [ |
| 667 | "run_loop.cc", |
| 668 | "run_loop.h", |
| 669 | ] |
| 670 | } |
| 671 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 672 | if (!build_with_chromium && is_clang) { |
| 673 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 674 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 675 | } |
| 676 | |
| 677 | deps = [ |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 678 | ":direct_transport", |
Ilya Nikolaevskiy | b0588e6 | 2018-08-27 14:12:27 +0200 | [diff] [blame] | 679 | ":fake_video_codecs", |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 680 | ":fileutils", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 681 | ":rtp_test_utils", |
| 682 | ":test_support", |
perkj | c5726c1 | 2017-03-01 03:37:08 -0800 | [diff] [blame] | 683 | ":video_test_common", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 684 | "../:webrtc_common", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 685 | "../api:libjingle_peerconnection_api", |
Artem Titov | 46c4e60 | 2018-08-17 14:26:54 +0200 | [diff] [blame] | 686 | "../api:simulated_network_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 687 | "../api:transport_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 688 | "../api/audio_codecs:builtin_audio_decoder_factory", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 689 | "../api/audio_codecs:builtin_audio_encoder_factory", |
Danil Chapovalov | ddc84e9 | 2018-10-24 17:01:58 +0200 | [diff] [blame] | 690 | "../api/test/video:function_video_factory", |
Jiawei Ou | c2ebe21 | 2018-11-08 10:02:56 -0800 | [diff] [blame] | 691 | "../api/video:builtin_video_bitrate_allocator_factory", |
| 692 | "../api/video:video_bitrate_allocator_factory", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 693 | "../api/video:video_frame", |
ilnik | d60d06a | 2017-04-05 03:02:20 -0700 | [diff] [blame] | 694 | "../api/video_codecs:video_codecs_api", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 695 | "../audio", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 696 | "../call", |
Mirko Bonadei | a0e1a55 | 2017-12-04 10:50:51 +0100 | [diff] [blame] | 697 | "../call:call_interfaces", |
Artem Titov | 4e199e9 | 2018-08-20 13:30:39 +0200 | [diff] [blame] | 698 | "../call:fake_network", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 699 | "../call:rtp_interfaces", |
sprang | db2a9fc | 2017-08-09 06:42:32 -0700 | [diff] [blame] | 700 | "../call:rtp_sender", |
Artem Titov | 4e199e9 | 2018-08-20 13:30:39 +0200 | [diff] [blame] | 701 | "../call:simulated_network", |
Artem Titov | 46c4e60 | 2018-08-17 14:26:54 +0200 | [diff] [blame] | 702 | "../call:simulated_packet_receiver", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 703 | "../call:video_stream_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 704 | "../logging:rtc_event_log_api", |
Qingsi Wang | 970b088 | 2018-02-01 11:04:46 -0800 | [diff] [blame] | 705 | "../logging:rtc_event_log_impl_base", |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 706 | "../media:rtc_internal_video_codecs", |
Mirko Bonadei | ad62792 | 2017-11-30 17:16:21 +0100 | [diff] [blame] | 707 | "../media:rtc_media_base", |
Artem Titov | 3faa832 | 2018-03-07 14:44:00 +0100 | [diff] [blame] | 708 | "../modules/audio_device", |
Paulina Hensman | 7bd79a0 | 2018-03-15 12:44:12 +0100 | [diff] [blame] | 709 | "../modules/audio_device:audio_device_impl", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 710 | "../modules/audio_device:mock_audio_device", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 711 | "../modules/audio_mixer:audio_mixer_impl", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 712 | "../modules/audio_processing", |
Sebastian Jansson | 50eb4c4 | 2018-08-03 13:25:17 +0200 | [diff] [blame] | 713 | "../modules/congestion_controller/bbr", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 714 | "../modules/rtp_rtcp", |
| 715 | "../modules/rtp_rtcp:mock_rtp_rtcp", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 716 | "../modules/rtp_rtcp:rtp_rtcp_format", |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame^] | 717 | "../modules/rtp_rtcp:rtp_video_header", |
| 718 | "../modules/video_coding:codec_globals_headers", |
charujain | cb728ea | 2017-09-18 03:08:08 -0700 | [diff] [blame] | 719 | "../modules/video_coding:video_coding_utility", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 720 | "../modules/video_coding:webrtc_h264", |
Emircan Uysaler | 03e6ec9 | 2018-03-09 15:03:26 -0800 | [diff] [blame] | 721 | "../modules/video_coding:webrtc_multiplex", |
Sergio Garcia Murillo | 43800f9 | 2018-06-21 16:16:38 +0200 | [diff] [blame] | 722 | "../modules/video_coding:webrtc_vp8", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 723 | "../modules/video_coding:webrtc_vp9", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 724 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 725 | "../rtc_base:rtc_base_approved", |
Sebastian Jansson | 50eb4c4 | 2018-08-03 13:25:17 +0200 | [diff] [blame] | 726 | "../rtc_base/experiments:congestion_controller_experiment", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 727 | "../system_wrappers", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 728 | "../system_wrappers:field_trial", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 729 | "../video", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 730 | "//testing/gtest", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 731 | "//third_party/abseil-cpp/absl/memory", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 732 | ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 733 | if (!is_android && !build_with_chromium) { |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 734 | deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 735 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 736 | } |
| 737 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 738 | rtc_source_set("test_renderer") { |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 739 | public_deps = [ |
| 740 | ":test_renderer_generic", |
| 741 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 742 | testonly = true |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 743 | if (is_mac) { |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 744 | public_deps += [ ":test_renderer_objc" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 745 | } |
| 746 | } |
| 747 | |
| 748 | if (is_mac) { |
| 749 | rtc_source_set("test_renderer_objc") { |
| 750 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 751 | visibility = [ ":test_renderer" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 752 | sources = [ |
| 753 | "mac/video_renderer_mac.h", |
| 754 | "mac/video_renderer_mac.mm", |
| 755 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 756 | deps = [ |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 757 | ":test_renderer_generic", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 758 | "../rtc_base:rtc_base_approved", |
| 759 | ] |
| 760 | libs = [ |
| 761 | "Cocoa.framework", |
| 762 | "OpenGL.framework", |
| 763 | "CoreVideo.framework", |
| 764 | ] |
| 765 | if (!build_with_chromium && is_clang) { |
| 766 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 767 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | rtc_source_set("test_renderer_generic") { |
| 773 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 774 | visibility = [ |
| 775 | ":test_renderer", |
| 776 | ":test_renderer_objc", |
| 777 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 778 | libs = [] |
| 779 | sources = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 780 | "video_renderer.cc", |
| 781 | "video_renderer.h", |
| 782 | "win/d3d_renderer.cc", |
| 783 | "win/d3d_renderer.h", |
| 784 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 785 | deps = [ |
| 786 | ":test_support", |
| 787 | "..:webrtc_common", |
Niels Möller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame] | 788 | "../api/video:video_frame", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 789 | "../common_video", |
Mirko Bonadei | ad62792 | 2017-11-30 17:16:21 +0100 | [diff] [blame] | 790 | "../media:rtc_media_base", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 791 | "../rtc_base:checks", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 792 | "../rtc_base:rtc_base_approved", |
| 793 | "//testing/gtest", |
| 794 | ] |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 795 | if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 796 | sources += [ "null_platform_renderer.cc" ] |
| 797 | } |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 798 | if ((is_linux && rtc_use_x11) || is_mac) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 799 | sources += [ |
| 800 | "gl/gl_renderer.cc", |
| 801 | "gl/gl_renderer.h", |
| 802 | ] |
| 803 | } |
| 804 | |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 805 | if (is_linux && rtc_use_x11) { |
Edward Lemur | 84a87c4 | 2017-11-07 19:07:31 +0100 | [diff] [blame] | 806 | sources += [ |
| 807 | "linux/glx_renderer.cc", |
| 808 | "linux/glx_renderer.h", |
| 809 | "linux/video_renderer_linux.cc", |
| 810 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 811 | libs += [ |
| 812 | "Xext", |
| 813 | "X11", |
| 814 | "GL", |
| 815 | ] |
| 816 | } |
| 817 | if (is_android) { |
| 818 | libs += [ |
| 819 | "GLESv2", |
| 820 | "log", |
| 821 | ] |
| 822 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 823 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 824 | if (!build_with_chromium && is_clang) { |
| 825 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 826 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 827 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 828 | } |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 829 | |
| 830 | rtc_source_set("audio_codec_mocks") { |
| 831 | testonly = true |
| 832 | sources = [ |
kwiberg | 2b3aa14 | 2017-06-14 03:31:17 -0700 | [diff] [blame] | 833 | "mock_audio_decoder.cc", |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 834 | "mock_audio_decoder.h", |
| 835 | "mock_audio_decoder_factory.h", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 836 | "mock_audio_encoder.cc", |
| 837 | "mock_audio_encoder.h", |
| 838 | "mock_audio_encoder_factory.h", |
| 839 | ] |
| 840 | |
| 841 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 842 | ":test_support", |
kwiberg | 529662a | 2017-09-04 05:43:17 -0700 | [diff] [blame] | 843 | "../api:array_view", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 844 | "../api/audio_codecs:audio_codecs_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 845 | "../api/audio_codecs:builtin_audio_decoder_factory", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 846 | "../rtc_base:rtc_base_approved", |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 847 | ] |
| 848 | } |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 849 | |
| 850 | if (!build_with_chromium && is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 851 | rtc_android_library("native_test_java") { |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 852 | testonly = true |
| 853 | java_files = [ |
| 854 | "android/org/webrtc/native_test/RTCNativeUnitTest.java", |
| 855 | "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java", |
| 856 | ] |
| 857 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 858 | "../rtc_base:base_java", |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 859 | "//testing/android/native_test:native_test_java", |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 860 | ] |
| 861 | } |
| 862 | } |