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 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 10 | import("//build/config/ui.gni") |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 11 | if (is_android) { |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
ehmaldonado | ed8c8ed | 2016-11-23 12:58:35 -0800 | [diff] [blame] | 14 | if (rtc_use_memcheck) { |
Henrik Kjellander | 90fd7d8 | 2017-05-09 08:30:10 +0200 | [diff] [blame] | 15 | import("//tools_webrtc/valgrind/valgrind-webrtc.gni") |
ehmaldonado | ed8c8ed | 2016-11-23 12:58:35 -0800 | [diff] [blame] | 16 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 17 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 18 | group("test") { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 19 | testonly = true |
| 20 | |
| 21 | deps = [ |
| 22 | ":field_trial", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 23 | ":rtp_test_utils", |
| 24 | ":test_common", |
| 25 | ":test_renderer", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 26 | ":test_support", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 27 | ":video_test_common", |
| 28 | ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 29 | |
oprypin | fbbba3f | 2017-09-25 08:34:41 -0700 | [diff] [blame] | 30 | if (rtc_include_tests) { |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 31 | deps += [ |
| 32 | ":test_main", |
| 33 | ":test_support_unittests", |
| 34 | ] |
| 35 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 36 | } |
| 37 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 38 | rtc_source_set("video_test_common") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 39 | visibility = [ "*" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 40 | testonly = true |
| 41 | sources = [ |
| 42 | "fake_texture_frame.cc", |
| 43 | "fake_texture_frame.h", |
| 44 | "frame_generator.cc", |
| 45 | "frame_generator.h", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 46 | "frame_generator_capturer.cc", |
| 47 | "frame_generator_capturer.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 48 | "frame_utils.cc", |
| 49 | "frame_utils.h", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 50 | "vcm_capturer.cc", |
| 51 | "vcm_capturer.h", |
sprang | c5d62e2 | 2017-04-02 23:53:04 -0700 | [diff] [blame] | 52 | "video_capturer.cc", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 53 | "video_capturer.h", |
mflodman | 351424e | 2017-08-10 02:43:14 -0700 | [diff] [blame] | 54 | "video_codec_settings.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 55 | ] |
| 56 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 57 | if (!build_with_chromium && is_clang) { |
| 58 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 59 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 63 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 64 | "../:typedefs", |
Patrik Höglund | 9e19403 | 2018-01-04 15:58:20 +0100 | [diff] [blame] | 65 | "../api:libjingle_peerconnection_api", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 66 | "../api:optional", |
Mirko Bonadei | 0594a7c | 2017-12-18 11:42:48 +0100 | [diff] [blame] | 67 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 68 | "../api:video_frame_api_i420", |
mflodman | 351424e | 2017-08-10 02:43:14 -0700 | [diff] [blame] | 69 | "../api/video_codecs:video_codecs_api", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 70 | "../call:video_stream_api", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 71 | "../common_video", |
sprang | c5d62e2 | 2017-04-02 23:53:04 -0700 | [diff] [blame] | 72 | "../media:rtc_media_base", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 73 | "../modules/video_capture:video_capture_module", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 74 | "../rtc_base:checks", |
Patrik Höglund | 76df0df | 2017-12-19 11:50:21 +0100 | [diff] [blame] | 75 | "../rtc_base:rtc_base", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 76 | "../rtc_base:rtc_task_queue", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 77 | "../system_wrappers", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 78 | ] |
| 79 | } |
| 80 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 81 | rtc_source_set("rtp_test_utils") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 82 | testonly = true |
| 83 | sources = [ |
| 84 | "rtcp_packet_parser.cc", |
| 85 | "rtcp_packet_parser.h", |
| 86 | "rtp_file_reader.cc", |
| 87 | "rtp_file_reader.h", |
| 88 | "rtp_file_writer.cc", |
| 89 | "rtp_file_writer.h", |
| 90 | ] |
| 91 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 92 | if (!build_with_chromium && is_clang) { |
| 93 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 94 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | deps = [ |
| 98 | "..:webrtc_common", |
kwiberg | 529662a | 2017-09-04 05:43:17 -0700 | [diff] [blame] | 99 | "../api:array_view", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 100 | "../modules/rtp_rtcp", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 101 | "../modules/rtp_rtcp:rtp_rtcp_format", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 102 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 103 | "../rtc_base:rtc_base_approved", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 104 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 105 | ] |
| 106 | } |
| 107 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 108 | rtc_source_set("field_trial") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 109 | visibility = [ "*" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 110 | testonly = true |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 111 | sources = [ |
| 112 | "field_trial.cc", |
| 113 | "field_trial.h", |
| 114 | ] |
| 115 | |
| 116 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 117 | "..:webrtc_common", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 118 | "../system_wrappers:field_trial_api", |
phoglund | 37ebcf0 | 2016-01-08 05:04:57 -0800 | [diff] [blame] | 119 | "../system_wrappers:field_trial_default", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 120 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 121 | } |
| 122 | |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 123 | rtc_source_set("perf_test") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 124 | visibility = [ "*" ] |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 125 | sources = [ |
| 126 | "testsupport/perf_test.cc", |
| 127 | "testsupport/perf_test.h", |
| 128 | ] |
| 129 | deps = [ |
| 130 | "..:webrtc_common", |
| 131 | "../api:array_view", |
| 132 | "../rtc_base:rtc_base_approved", |
| 133 | ] |
| 134 | } |
| 135 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 136 | if (is_ios) { |
| 137 | rtc_source_set("test_support_objc") { |
| 138 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 139 | visibility = [ ":test_support" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 140 | sources = [ |
| 141 | "ios/test_support.h", |
| 142 | "ios/test_support.mm", |
| 143 | ] |
denicija | d207a39 | 2017-09-11 06:43:28 -0700 | [diff] [blame] | 144 | deps = [ |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 145 | ":perf_test", |
denicija | d207a39 | 2017-09-11 06:43:28 -0700 | [diff] [blame] | 146 | "../sdk:common_objc", |
| 147 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 148 | } |
| 149 | } |
| 150 | |
Patrik Höglund | 34924c2 | 2018-01-19 09:11:07 +0100 | [diff] [blame] | 151 | config("suppress_warning_4373") { |
| 152 | if (is_win) { |
| 153 | cflags = [ |
| 154 | # MSVC has a bug which generates this warning when using mocks; see the |
| 155 | # section on warning 4373 in he googlemock FAQ. This warning isn't the |
| 156 | # least relevant for us, anyway. |
| 157 | "/wd4373", |
| 158 | ] |
| 159 | } |
| 160 | } |
| 161 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 162 | rtc_source_set("test_support") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 163 | visibility = [ "*" ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 164 | testonly = true |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 165 | |
Mirko Bonadei | 65ce311 | 2018-01-26 11:57:47 +0100 | [diff] [blame] | 166 | all_dependent_configs = [ |
| 167 | ":suppress_warning_4373", |
| 168 | "//third_party/googletest:gmock_config", |
| 169 | "//third_party/googletest:gtest_config", |
| 170 | ] |
Patrik Höglund | 34924c2 | 2018-01-19 09:11:07 +0100 | [diff] [blame] | 171 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 172 | sources = [ |
| 173 | "gmock.h", |
| 174 | "gtest.h", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 175 | "testsupport/unittest_utils.h", |
| 176 | ] |
| 177 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 178 | public_deps = [ |
| 179 | ":fileutils", |
| 180 | ] |
Kári Tristan Helgason | e2baffb | 2017-06-09 10:31:58 +0200 | [diff] [blame] | 181 | if (is_ios) { |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 182 | public_deps += [ ":test_support_objc" ] |
Kári Tristan Helgason | e2baffb | 2017-06-09 10:31:58 +0200 | [diff] [blame] | 183 | } |
| 184 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 185 | deps = [ |
| 186 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 187 | "../:typedefs", |
Edward Lemur | 936dfb1 | 2017-11-30 11:43:42 +0100 | [diff] [blame] | 188 | "../api:array_view", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 189 | "../common_video", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 190 | "../rtc_base:gtest_prod", |
| 191 | "../rtc_base:rtc_base_approved", |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 192 | "../system_wrappers", |
| 193 | "//testing/gmock", |
| 194 | "//testing/gtest", |
| 195 | ] |
| 196 | |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 197 | if (!build_with_chromium && is_clang) { |
| 198 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 199 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 200 | } |
| 201 | |
| 202 | if (is_android) { |
| 203 | deps += [ "//base:base" ] |
| 204 | } |
| 205 | |
| 206 | if (is_ios && !build_with_chromium) { |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 207 | deps += [ "../sdk:common_objc" ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | if (rtc_use_memcheck) { |
| 211 | data = valgrind_webrtc_dependencies |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 212 | } |
| 213 | } |
| 214 | |
oprypin | fbbba3f | 2017-09-25 08:34:41 -0700 | [diff] [blame] | 215 | if (rtc_include_tests) { |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 216 | rtc_source_set("test_main") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 217 | visibility = [ "*" ] |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 218 | testonly = true |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 219 | sources = [ |
| 220 | "test_main.cc", |
| 221 | ] |
| 222 | |
| 223 | public_deps = [ |
| 224 | ":test_support", |
| 225 | ] |
| 226 | deps = [ |
| 227 | ":field_trial", |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 228 | ":perf_test", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 229 | "../rtc_base:rtc_base_approved", |
Bjorn Terelius | edab301 | 2018-01-31 17:23:40 +0100 | [diff] [blame] | 230 | "../system_wrappers:field_trial_default", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 231 | "../system_wrappers:metrics_default", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 232 | "../system_wrappers:runtime_enabled_features_default", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 233 | "//testing/gtest", |
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 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 237 | rtc_source_set("video_test_support") { |
| 238 | testonly = true |
| 239 | |
| 240 | sources = [ |
| 241 | "testsupport/frame_reader.h", |
| 242 | "testsupport/frame_writer.h", |
| 243 | "testsupport/metrics/video_metrics.cc", |
| 244 | "testsupport/metrics/video_metrics.h", |
| 245 | "testsupport/mock/mock_frame_reader.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 246 | "testsupport/y4m_frame_writer.cc", |
| 247 | "testsupport/yuv_frame_reader.cc", |
| 248 | "testsupport/yuv_frame_writer.cc", |
| 249 | ] |
| 250 | |
| 251 | deps = [ |
| 252 | ":test_support", |
| 253 | ":video_test_common", |
| 254 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 255 | "../:typedefs", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 256 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 257 | "../api:video_frame_api_i420", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 258 | "../common_video", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 259 | "../rtc_base:checks", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 260 | "../rtc_base:rtc_base_approved", |
| 261 | "../system_wrappers", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 262 | "//testing/gtest", |
Mirko Bonadei | 401d056 | 2017-12-14 11:24:00 +0100 | [diff] [blame] | 263 | "//third_party/libyuv", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 264 | ] |
| 265 | |
| 266 | if (!is_ios) { |
| 267 | deps += [ "//third_party:jpeg" ] |
| 268 | sources += [ "testsupport/jpeg_frame_writer.cc" ] |
| 269 | } else { |
| 270 | sources += [ "testsupport/jpeg_frame_writer_ios.cc" ] |
| 271 | } |
| 272 | |
| 273 | public_deps = [ |
| 274 | ":fileutils", |
| 275 | ] |
| 276 | |
| 277 | if (!build_with_chromium && is_clang) { |
| 278 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 279 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 280 | } |
| 281 | |
| 282 | if (is_android) { |
| 283 | deps += [ "//base:base" ] |
| 284 | } |
| 285 | |
| 286 | if (is_ios) { |
| 287 | deps += [ "../sdk:common_objc" ] |
| 288 | } |
| 289 | |
| 290 | if (rtc_use_memcheck) { |
| 291 | data = valgrind_webrtc_dependencies |
| 292 | } |
| 293 | } |
| 294 | |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 295 | rtc_source_set("test_support_test_artifacts") { |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 296 | testonly = true |
| 297 | sources = [ |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 298 | "testsupport/test_artifacts.cc", |
| 299 | "testsupport/test_artifacts.h", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 300 | ] |
| 301 | deps = [ |
| 302 | ":fileutils", |
| 303 | "../rtc_base:rtc_base_approved", |
| 304 | ] |
| 305 | } |
| 306 | |
| 307 | test_support_unittests_resources = [ |
| 308 | "../resources/foreman_cif_short.yuv", |
| 309 | "../resources/video_coding/frame-ethernet-ii.pcap", |
| 310 | "../resources/video_coding/frame-loopback.pcap", |
| 311 | "../resources/video_coding/pltype103.rtp", |
| 312 | "../resources/video_coding/pltype103_header_only.rtp", |
| 313 | "../resources/video_coding/ssrcs-2.pcap", |
| 314 | "../resources/video_coding/ssrcs-3.pcap", |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 315 | ] |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 316 | |
| 317 | if (is_ios) { |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 318 | bundle_data("test_support_unittests_bundle_data") { |
| 319 | testonly = true |
| 320 | sources = test_support_unittests_resources |
| 321 | outputs = [ |
| 322 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 323 | ] |
| 324 | } |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 325 | } |
| 326 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 327 | rtc_test("test_support_unittests") { |
| 328 | deps = [ |
| 329 | ":fake_audio_device", |
Edward Lemur | e66572b | 2018-01-05 15:34:09 +0100 | [diff] [blame] | 330 | ":perf_test", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 331 | ":rtp_test_utils", |
| 332 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 333 | "../api:video_frame_api_i420", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 334 | "../call:call_interfaces", |
| 335 | "../common_audio", |
| 336 | "../modules/rtp_rtcp", |
| 337 | "../rtc_base:rtc_base_approved", |
| 338 | "../system_wrappers", |
| 339 | ] |
| 340 | sources = [ |
| 341 | "fake_audio_device_unittest.cc", |
| 342 | "fake_network_pipe_unittest.cc", |
| 343 | "frame_generator_unittest.cc", |
| 344 | "rtp_file_reader_unittest.cc", |
| 345 | "rtp_file_writer_unittest.cc", |
| 346 | "single_threaded_task_queue_unittest.cc", |
| 347 | "testsupport/always_passing_unittest.cc", |
| 348 | "testsupport/metrics/video_metrics_unittest.cc", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 349 | "testsupport/perf_test_unittest.cc", |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 350 | "testsupport/test_artifacts_unittest.cc", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 351 | "testsupport/y4m_frame_writer_unittest.cc", |
| 352 | "testsupport/yuv_frame_reader_unittest.cc", |
| 353 | "testsupport/yuv_frame_writer_unittest.cc", |
| 354 | ] |
| 355 | |
| 356 | # TODO(jschuh): Bug 1348: fix this warning. |
| 357 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 358 | |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 359 | if (!build_with_chromium && is_clang) { |
| 360 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 361 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 362 | } |
| 363 | |
| 364 | data = test_support_unittests_resources |
| 365 | if (is_android) { |
| 366 | deps += [ "//testing/android/native_test:native_test_support" ] |
| 367 | shard_timeout = 900 |
| 368 | } |
| 369 | |
| 370 | if (is_ios) { |
| 371 | deps += [ ":test_support_unittests_bundle_data" ] |
| 372 | } |
| 373 | |
| 374 | deps += [ |
| 375 | ":direct_transport", |
| 376 | ":fileutils_unittests", |
| 377 | ":test_common", |
| 378 | ":test_main", |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 379 | ":test_support_test_artifacts", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 380 | ":video_test_common", |
| 381 | ":video_test_support", |
| 382 | "../modules/video_capture", |
| 383 | "../rtc_base:rtc_base_approved", |
Oleh Prypin | 5ab6854 | 2017-09-25 09:18:00 +0000 | [diff] [blame] | 384 | "//testing/gtest", |
| 385 | ] |
| 386 | } |
Oleh Prypin | 90ce84e | 2017-09-25 10:27:22 +0200 | [diff] [blame] | 387 | } |
| 388 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 389 | if (is_ios) { |
| 390 | rtc_source_set("fileutils_objc") { |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 391 | visibility = [ ":fileutils" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 392 | sources = [ |
| 393 | "testsupport/iosfileutils.mm", |
| 394 | ] |
| 395 | deps = [ |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 396 | "..:typedefs", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 397 | "..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 398 | "../rtc_base:checks", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 399 | "../rtc_base:rtc_base_approved", |
kthelgason | 36d658d | 2017-08-24 05:43:45 -0700 | [diff] [blame] | 400 | "../sdk:common_objc", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 401 | ] |
| 402 | } |
| 403 | } |
| 404 | |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 405 | rtc_source_set("fileutils") { |
| 406 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 407 | visibility = [ |
| 408 | ":fileutils_unittests", |
Edward Lemur | af8659a | 2017-09-27 14:46:24 +0200 | [diff] [blame] | 409 | ":test_support_test_artifacts", |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 410 | ":test_support", |
| 411 | ":video_test_support", |
| 412 | ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 413 | sources = [ |
| 414 | "testsupport/fileutils.cc", |
| 415 | "testsupport/fileutils.h", |
| 416 | ] |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 417 | deps = [ |
| 418 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 419 | "../:typedefs", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 420 | "../api:optional", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 421 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 422 | "../rtc_base:rtc_base_approved", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 423 | ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 424 | if (is_ios) { |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 425 | deps += [ ":fileutils_objc" ] |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 426 | } |
| 427 | if (is_win) { |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 428 | deps += [ "../rtc_base:rtc_base" ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 429 | } |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 430 | } |
| 431 | |
| 432 | rtc_source_set("run_test") { |
| 433 | testonly = true |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 434 | if (is_mac) { |
| 435 | public_deps = [ |
| 436 | ":run_test_objc", |
| 437 | ] |
| 438 | } else { |
| 439 | public_deps = [ |
| 440 | ":run_test_generic", |
| 441 | ] |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | rtc_source_set("run_test_interface") { |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 446 | sources = [ |
| 447 | "run_test.h", |
| 448 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 449 | } |
| 450 | |
| 451 | if (is_mac) { |
| 452 | rtc_source_set("run_test_objc") { |
| 453 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 454 | visibility = [ ":run_test" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 455 | sources = [ |
| 456 | "mac/run_test.mm", |
| 457 | ] |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 458 | deps = [ |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 459 | ":run_test_interface", |
| 460 | ] |
mbonadei | 9452c62 | 2017-04-27 12:29:29 -0700 | [diff] [blame] | 461 | } |
| 462 | } |
| 463 | |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 464 | rtc_source_set("run_test_generic") { |
| 465 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 466 | visibility = [ ":run_test" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 467 | sources = [ |
| 468 | "run_test.cc", |
| 469 | ] |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 470 | deps = [ |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 471 | ":run_test_interface", |
| 472 | ] |
| 473 | } |
| 474 | |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 475 | rtc_source_set("fileutils_unittests") { |
| 476 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 477 | visibility = [ ":*" ] # Only targets in this file can depend on this. |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 478 | sources = [ |
| 479 | "testsupport/fileutils_unittest.cc", |
| 480 | ] |
| 481 | deps = [ |
| 482 | ":fileutils", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 483 | ":test_support", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 484 | "../api:optional", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 485 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 486 | "../rtc_base:rtc_base_approved", |
ehmaldonado | 37535bf | 2016-12-05 06:42:45 -0800 | [diff] [blame] | 487 | "//testing/gtest", |
| 488 | ] |
| 489 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 490 | |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 491 | rtc_source_set("direct_transport") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 492 | visibility = [ "*" ] |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 493 | testonly = true |
| 494 | sources = [ |
| 495 | "direct_transport.cc", |
| 496 | "direct_transport.h", |
| 497 | "fake_network_pipe.cc", |
| 498 | "fake_network_pipe.h", |
| 499 | ] |
| 500 | if (!build_with_chromium && is_clang) { |
| 501 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 502 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 503 | } |
| 504 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 505 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 506 | "../:typedefs", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 507 | "../api:transport_api", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 508 | "../call", |
Mirko Bonadei | a0e1a55 | 2017-12-04 10:50:51 +0100 | [diff] [blame] | 509 | "../call:call_interfaces", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 510 | "../modules/rtp_rtcp", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 511 | "../rtc_base:rtc_base_approved", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 512 | "../rtc_base:sequenced_task_checker", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 513 | "../system_wrappers", |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 514 | ] |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 515 | public_deps = [ |
| 516 | ":single_threaded_task_queue", |
| 517 | ] |
| 518 | } |
| 519 | |
| 520 | rtc_source_set("single_threaded_task_queue") { |
| 521 | testonly = true |
| 522 | sources = [ |
| 523 | "single_threaded_task_queue.cc", |
| 524 | "single_threaded_task_queue.h", |
| 525 | ] |
| 526 | deps = [ |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 527 | "../rtc_base:checks", |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 528 | "../rtc_base:rtc_base_approved", |
| 529 | ] |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 530 | } |
| 531 | |
perkj | 16ccfdf | 2017-02-28 14:41:05 -0800 | [diff] [blame] | 532 | rtc_source_set("fake_audio_device") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 533 | visibility = [ "*" ] |
perkj | 16ccfdf | 2017-02-28 14:41:05 -0800 | [diff] [blame] | 534 | testonly = true |
| 535 | sources = [ |
| 536 | "fake_audio_device.cc", |
| 537 | "fake_audio_device.h", |
| 538 | ] |
| 539 | if (!build_with_chromium && is_clang) { |
| 540 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 541 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 542 | } |
| 543 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 544 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 545 | "../:typedefs", |
kwiberg | 529662a | 2017-09-04 05:43:17 -0700 | [diff] [blame] | 546 | "../api:array_view", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 547 | "../common_audio:common_audio", |
mbonadei | b80ef8c | 2017-04-24 13:05:47 -0700 | [diff] [blame] | 548 | "../modules/audio_device:audio_device", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 549 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 550 | "../rtc_base:rtc_base_approved", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 551 | "../system_wrappers", |
perkj | 16ccfdf | 2017-02-28 14:41:05 -0800 | [diff] [blame] | 552 | ] |
| 553 | } |
| 554 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 555 | rtc_source_set("test_common") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 556 | testonly = true |
| 557 | sources = [ |
| 558 | "call_test.cc", |
| 559 | "call_test.h", |
| 560 | "configurable_frame_size_encoder.cc", |
| 561 | "configurable_frame_size_encoder.h", |
| 562 | "constants.cc", |
| 563 | "constants.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 564 | "drifting_clock.cc", |
| 565 | "drifting_clock.h", |
| 566 | "encoder_settings.cc", |
| 567 | "encoder_settings.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 568 | "fake_decoder.cc", |
| 569 | "fake_decoder.h", |
| 570 | "fake_encoder.cc", |
| 571 | "fake_encoder.h", |
sakal | 55d932b | 2016-09-30 06:19:08 -0700 | [diff] [blame] | 572 | "fake_videorenderer.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 573 | "layer_filtering_transport.cc", |
| 574 | "layer_filtering_transport.h", |
| 575 | "mock_transport.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 576 | "null_transport.cc", |
| 577 | "null_transport.h", |
| 578 | "rtp_rtcp_observer.h", |
| 579 | "statistics.cc", |
| 580 | "statistics.h", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 581 | "win/run_loop_win.cc", |
| 582 | ] |
| 583 | if (!is_win) { |
| 584 | sources += [ |
| 585 | "run_loop.cc", |
| 586 | "run_loop.h", |
| 587 | ] |
| 588 | } |
| 589 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 590 | if (!build_with_chromium && is_clang) { |
| 591 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 592 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 593 | } |
| 594 | |
| 595 | deps = [ |
perkj | 488c5dc | 2017-02-08 05:55:51 -0800 | [diff] [blame] | 596 | ":direct_transport", |
perkj | 16ccfdf | 2017-02-28 14:41:05 -0800 | [diff] [blame] | 597 | ":fake_audio_device", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 598 | ":rtp_test_utils", |
| 599 | ":test_support", |
perkj | c5726c1 | 2017-03-01 03:37:08 -0800 | [diff] [blame] | 600 | ":video_test_common", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 601 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 602 | "../:typedefs", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 603 | "../api:libjingle_peerconnection_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 604 | "../api:transport_api", |
| 605 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 606 | "../api:video_frame_api_i420", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 607 | "../api/audio_codecs:builtin_audio_decoder_factory", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 608 | "../api/audio_codecs:builtin_audio_encoder_factory", |
ilnik | d60d06a | 2017-04-05 03:02:20 -0700 | [diff] [blame] | 609 | "../api/video_codecs:video_codecs_api", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 610 | "../audio", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 611 | "../call", |
Mirko Bonadei | a0e1a55 | 2017-12-04 10:50:51 +0100 | [diff] [blame] | 612 | "../call:call_interfaces", |
sprang | db2a9fc | 2017-08-09 06:42:32 -0700 | [diff] [blame] | 613 | "../call:rtp_sender", |
aleloi | 440b6d9 | 2017-08-22 05:43:23 -0700 | [diff] [blame] | 614 | "../call:video_stream_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 615 | "../common_video", |
| 616 | "../logging:rtc_event_log_api", |
Qingsi Wang | 970b088 | 2018-02-01 11:04:46 -0800 | [diff] [blame] | 617 | "../logging:rtc_event_log_impl_base", |
Mirko Bonadei | ad62792 | 2017-11-30 17:16:21 +0100 | [diff] [blame] | 618 | "../media:rtc_media_base", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 619 | "../modules/audio_device:mock_audio_device", |
aleloi | 10111bc | 2016-11-17 06:48:48 -0800 | [diff] [blame] | 620 | "../modules/audio_mixer:audio_mixer_impl", |
aleloi | dd31071 | 2016-11-17 06:28:59 -0800 | [diff] [blame] | 621 | "../modules/audio_processing", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 622 | "../modules/rtp_rtcp", |
| 623 | "../modules/rtp_rtcp:mock_rtp_rtcp", |
Mirko Bonadei | b5728d9 | 2017-12-06 07:51:33 +0100 | [diff] [blame] | 624 | "../modules/rtp_rtcp:rtp_rtcp_format", |
Patrik Höglund | 99175c6 | 2018-01-08 11:05:10 +0100 | [diff] [blame] | 625 | "../modules/video_coding:video_codec_interface", |
charujain | cb728ea | 2017-09-18 03:08:08 -0700 | [diff] [blame] | 626 | "../modules/video_coding:video_coding_utility", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 627 | "../modules/video_coding:webrtc_h264", |
| 628 | "../modules/video_coding:webrtc_vp8", |
| 629 | "../modules/video_coding:webrtc_vp9", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 630 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 631 | "../rtc_base:rtc_base_approved", |
| 632 | "../rtc_base:rtc_task_queue", |
| 633 | "../rtc_base:sequenced_task_checker", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 634 | "../system_wrappers", |
Mirko Bonadei | a498ae8 | 2017-12-06 09:17:14 +0100 | [diff] [blame] | 635 | "../system_wrappers:field_trial_api", |
Ilya Nikolaevskiy | 2ffe3e8 | 2018-01-17 19:57:24 +0000 | [diff] [blame] | 636 | "../system_wrappers:runtime_enabled_features_api", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 637 | "../video", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 638 | "//testing/gtest", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 639 | ] |
mbonadei | 148d5a2 | 2017-04-28 05:24:50 -0700 | [diff] [blame] | 640 | if (!is_android && !build_with_chromium) { |
oprypin | 92220ff | 2017-03-23 03:40:03 -0700 | [diff] [blame] | 641 | deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 642 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 643 | } |
| 644 | |
| 645 | config("test_renderer_exported_config") { |
| 646 | if (is_win && is_clang) { |
| 647 | # GN orders flags on a target before flags from configs. The default config |
| 648 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 649 | # come from a config and cannot be on the target directly. |
ehmaldonado | 4bc4d27 | 2016-08-25 04:15:40 -0700 | [diff] [blame] | 650 | cflags = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 651 | "-Wno-bool-conversion", |
| 652 | "-Wno-comment", |
| 653 | "-Wno-delete-non-virtual-dtor", |
| 654 | ] |
| 655 | } |
| 656 | } |
| 657 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 658 | rtc_source_set("test_renderer") { |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 659 | public_deps = [ |
| 660 | ":test_renderer_generic", |
| 661 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 662 | testonly = true |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 663 | if (is_mac) { |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 664 | public_deps += [ ":test_renderer_objc" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 665 | } |
| 666 | } |
| 667 | |
| 668 | if (is_mac) { |
| 669 | rtc_source_set("test_renderer_objc") { |
| 670 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 671 | visibility = [ ":test_renderer" ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 672 | sources = [ |
| 673 | "mac/video_renderer_mac.h", |
| 674 | "mac/video_renderer_mac.mm", |
| 675 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 676 | deps = [ |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 677 | ":test_renderer_generic", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 678 | "../rtc_base:rtc_base_approved", |
| 679 | ] |
| 680 | libs = [ |
| 681 | "Cocoa.framework", |
| 682 | "OpenGL.framework", |
| 683 | "CoreVideo.framework", |
| 684 | ] |
| 685 | if (!build_with_chromium && is_clang) { |
| 686 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 687 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 688 | } |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | rtc_source_set("test_renderer_generic") { |
| 693 | testonly = true |
mbonadei | 9c296b3 | 2017-09-05 05:11:41 -0700 | [diff] [blame] | 694 | visibility = [ |
| 695 | ":test_renderer", |
| 696 | ":test_renderer_objc", |
| 697 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 698 | libs = [] |
| 699 | sources = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 700 | "video_renderer.cc", |
| 701 | "video_renderer.h", |
| 702 | "win/d3d_renderer.cc", |
| 703 | "win/d3d_renderer.h", |
| 704 | ] |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 705 | deps = [ |
| 706 | ":test_support", |
| 707 | "..:webrtc_common", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 708 | "../:typedefs", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 709 | "../api:libjingle_peerconnection_api", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 710 | "../common_video", |
Mirko Bonadei | ad62792 | 2017-11-30 17:16:21 +0100 | [diff] [blame] | 711 | "../media:rtc_media_base", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 712 | "../rtc_base:checks", |
mbonadei | cd95a4e | 2017-08-23 23:55:54 -0700 | [diff] [blame] | 713 | "../rtc_base:rtc_base_approved", |
| 714 | "//testing/gtest", |
| 715 | ] |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 716 | if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 717 | sources += [ "null_platform_renderer.cc" ] |
| 718 | } |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 719 | if ((is_linux && rtc_use_x11) || is_mac) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 720 | sources += [ |
| 721 | "gl/gl_renderer.cc", |
| 722 | "gl/gl_renderer.h", |
| 723 | ] |
| 724 | } |
| 725 | |
Joachim Bauch | 75f18fc | 2017-12-20 21:25:47 +0100 | [diff] [blame] | 726 | if (is_linux && rtc_use_x11) { |
Edward Lemur | 84a87c4 | 2017-11-07 19:07:31 +0100 | [diff] [blame] | 727 | sources += [ |
| 728 | "linux/glx_renderer.cc", |
| 729 | "linux/glx_renderer.h", |
| 730 | "linux/video_renderer_linux.cc", |
| 731 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 732 | libs += [ |
| 733 | "Xext", |
| 734 | "X11", |
| 735 | "GL", |
| 736 | ] |
| 737 | } |
| 738 | if (is_android) { |
| 739 | libs += [ |
| 740 | "GLESv2", |
| 741 | "log", |
| 742 | ] |
| 743 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 744 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 745 | public_configs = [ ":test_renderer_exported_config" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 746 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 747 | if (!build_with_chromium && is_clang) { |
| 748 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 749 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 750 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 751 | } |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 752 | |
| 753 | rtc_source_set("audio_codec_mocks") { |
| 754 | testonly = true |
| 755 | sources = [ |
kwiberg | 2b3aa14 | 2017-06-14 03:31:17 -0700 | [diff] [blame] | 756 | "mock_audio_decoder.cc", |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 757 | "mock_audio_decoder.h", |
| 758 | "mock_audio_decoder_factory.h", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 759 | "mock_audio_encoder.cc", |
| 760 | "mock_audio_encoder.h", |
| 761 | "mock_audio_encoder_factory.h", |
| 762 | ] |
| 763 | |
| 764 | deps = [ |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 765 | ":test_support", |
kwiberg | 529662a | 2017-09-04 05:43:17 -0700 | [diff] [blame] | 766 | "../api:array_view", |
ossu | eb1fde4 | 2017-05-02 06:46:30 -0700 | [diff] [blame] | 767 | "../api/audio_codecs:audio_codecs_api", |
mbonadei | 3edccb9 | 2017-06-01 04:47:20 -0700 | [diff] [blame] | 768 | "../api/audio_codecs:builtin_audio_decoder_factory", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 769 | "../rtc_base:rtc_base_approved", |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 770 | ] |
| 771 | } |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 772 | |
| 773 | if (!build_with_chromium && is_android) { |
Mirko Bonadei | fbb3b7d | 2017-11-07 15:36:33 +0000 | [diff] [blame] | 774 | rtc_android_library("native_test_java") { |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 775 | testonly = true |
| 776 | java_files = [ |
| 777 | "android/org/webrtc/native_test/RTCNativeUnitTest.java", |
| 778 | "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java", |
| 779 | ] |
| 780 | deps = [ |
jianjun.zhu | c024740 | 2017-07-11 06:20:45 -0700 | [diff] [blame] | 781 | "../rtc_base:base_java", |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 782 | "//testing/android/native_test:native_test_java", |
sakal | d7fdb80 | 2017-05-26 01:51:53 -0700 | [diff] [blame] | 783 | ] |
| 784 | } |
| 785 | } |