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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 9 | import("../build/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 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 14 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 15 | rtc_source_set("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 | ":channel_transport", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 20 | ":field_trial", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 21 | ":rtp_test_utils", |
| 22 | ":test_common", |
| 23 | ":test_renderer", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 24 | ":test_support", |
| 25 | ":test_support_main", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 26 | ":test_support_unittests", |
| 27 | ":video_test_common", |
| 28 | ] |
| 29 | } |
| 30 | |
| 31 | config("channel_transport_warnings_config") { |
| 32 | if (is_win) { |
| 33 | cflags = [ "/wd4302" ] # cast truncation |
| 34 | |
| 35 | if (is_clang) { |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 36 | # GN orders flags on a target before flags from configs. The default |
| 37 | # config adds -Wall, and this flag have to be after -Wall -- so they need |
| 38 | # to come from a config and cannot be on the target directly. |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 39 | cflags += [ |
| 40 | "-Wno-parentheses-equality", |
| 41 | "-Wno-reorder", |
| 42 | "-Wno-tautological-constant-out-of-range-compare", |
ehmaldonado | d02fe4b | 2016-08-26 13:31:24 -0700 | [diff] [blame] | 43 | |
| 44 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268 |
| 45 | # for -Wno-thread-safety-analysis |
| 46 | "-Wno-thread-safety-analysis", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 47 | "-Wno-unused-private-field", |
| 48 | ] |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 53 | rtc_source_set("channel_transport") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 54 | testonly = true |
| 55 | sources = [ |
| 56 | "channel_transport/channel_transport.cc", |
| 57 | "channel_transport/channel_transport.h", |
| 58 | "channel_transport/traffic_control_win.cc", |
| 59 | "channel_transport/traffic_control_win.h", |
| 60 | "channel_transport/udp_socket2_manager_win.cc", |
| 61 | "channel_transport/udp_socket2_manager_win.h", |
| 62 | "channel_transport/udp_socket2_win.cc", |
| 63 | "channel_transport/udp_socket2_win.h", |
| 64 | "channel_transport/udp_socket_manager_posix.cc", |
| 65 | "channel_transport/udp_socket_manager_posix.h", |
| 66 | "channel_transport/udp_socket_manager_wrapper.cc", |
| 67 | "channel_transport/udp_socket_manager_wrapper.h", |
| 68 | "channel_transport/udp_socket_posix.cc", |
| 69 | "channel_transport/udp_socket_posix.h", |
| 70 | "channel_transport/udp_socket_wrapper.cc", |
| 71 | "channel_transport/udp_socket_wrapper.h", |
| 72 | "channel_transport/udp_transport.h", |
| 73 | "channel_transport/udp_transport_impl.cc", |
| 74 | "channel_transport/udp_transport_impl.h", |
| 75 | ] |
| 76 | |
ehmaldonado | 7a2ce0b | 2016-09-05 01:35:44 -0700 | [diff] [blame] | 77 | configs += [ ":channel_transport_warnings_config" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 78 | |
| 79 | if (is_clang && !is_nacl) { |
| 80 | # Suppress warnings from the Chromium Clang plugin. |
| 81 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 82 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | deps = [ |
| 86 | "..:webrtc_common", |
| 87 | "../system_wrappers", |
| 88 | "//testing/gtest", |
| 89 | ] |
| 90 | } |
| 91 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 92 | rtc_source_set("video_test_common") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 93 | testonly = true |
| 94 | sources = [ |
| 95 | "fake_texture_frame.cc", |
| 96 | "fake_texture_frame.h", |
| 97 | "frame_generator.cc", |
| 98 | "frame_generator.h", |
| 99 | "frame_utils.cc", |
| 100 | "frame_utils.h", |
| 101 | ] |
| 102 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 103 | if (is_clang && !is_nacl) { |
| 104 | # Suppress warnings from the Chromium Clang plugin. |
| 105 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 106 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | deps = [ |
| 110 | "../common_video", |
| 111 | ] |
| 112 | } |
| 113 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 114 | rtc_source_set("rtp_test_utils") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 115 | testonly = true |
| 116 | sources = [ |
| 117 | "rtcp_packet_parser.cc", |
| 118 | "rtcp_packet_parser.h", |
| 119 | "rtp_file_reader.cc", |
| 120 | "rtp_file_reader.h", |
| 121 | "rtp_file_writer.cc", |
| 122 | "rtp_file_writer.h", |
| 123 | ] |
| 124 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 125 | if (is_clang && !is_nacl) { |
| 126 | # Suppress warnings from the Chromium Clang plugin. |
| 127 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 128 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | deps = [ |
| 132 | "..:webrtc_common", |
| 133 | "../modules/rtp_rtcp", |
| 134 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 135 | ] |
| 136 | } |
| 137 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 138 | rtc_source_set("field_trial") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 139 | testonly = true |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 140 | sources = [ |
| 141 | "field_trial.cc", |
| 142 | "field_trial.h", |
| 143 | ] |
| 144 | |
| 145 | deps = [ |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 146 | "..:webrtc_common", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 147 | "../system_wrappers", |
phoglund | 37ebcf0 | 2016-01-08 05:04:57 -0800 | [diff] [blame] | 148 | "../system_wrappers:field_trial_default", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 149 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 150 | } |
| 151 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 152 | rtc_source_set("test_main") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 153 | testonly = true |
| 154 | sources = [ |
| 155 | "test_main.cc", |
| 156 | ] |
| 157 | |
| 158 | deps = [ |
| 159 | ":field_trial", |
| 160 | ":test_support", |
| 161 | "../system_wrappers:metrics_default", |
| 162 | "//testing/gtest", |
| 163 | "//third_party/gflags", |
| 164 | ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 165 | } |
| 166 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 167 | rtc_source_set("test_support") { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 168 | testonly = true |
| 169 | |
| 170 | sources = [ |
| 171 | "testsupport/fileutils.cc", |
| 172 | "testsupport/fileutils.h", |
| 173 | "testsupport/frame_reader.cc", |
| 174 | "testsupport/frame_reader.h", |
| 175 | "testsupport/frame_writer.cc", |
| 176 | "testsupport/frame_writer.h", |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 177 | "testsupport/iosfileutils.mm", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 178 | "testsupport/metrics/video_metrics.cc", |
| 179 | "testsupport/metrics/video_metrics.h", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 180 | "testsupport/mock/mock_frame_reader.h", |
| 181 | "testsupport/mock/mock_frame_writer.h", |
| 182 | "testsupport/packet_reader.cc", |
| 183 | "testsupport/packet_reader.h", |
| 184 | "testsupport/perf_test.cc", |
| 185 | "testsupport/perf_test.h", |
| 186 | "testsupport/trace_to_stderr.cc", |
| 187 | "testsupport/trace_to_stderr.h", |
| 188 | ] |
| 189 | |
| 190 | deps = [ |
kjellander | 988d31e | 2016-02-05 00:23:50 -0800 | [diff] [blame] | 191 | "../base:gtest_prod", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 192 | "../common_video", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 193 | "../system_wrappers", |
Peter Boström | 62e9bda | 2015-11-23 15:12:06 +0100 | [diff] [blame] | 194 | "//testing/gmock", |
| 195 | "//testing/gtest", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 196 | ] |
| 197 | |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 198 | if (is_clang) { |
| 199 | # Suppress warnings from the Chromium Clang plugin. |
| 200 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 201 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 202 | } |
| 203 | |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 204 | if (is_ios) { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 205 | configs += [ "//build/config/compiler:enable_arc" ] |
| 206 | } |
| 207 | |
| 208 | if (use_x11) { |
| 209 | deps += [ "//tools/xdisplaycheck" ] |
kjellander | 95177d1 | 2016-04-07 00:13:58 -0700 | [diff] [blame] | 210 | } |
| 211 | |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 212 | if (is_android) { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 213 | deps += [ "//base:base" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 214 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 215 | } |
| 216 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 217 | # Depend on this target when you want to have test_support but also the |
| 218 | # main method needed for gtest to execute! |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 219 | rtc_source_set("test_support_main") { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 220 | testonly = true |
| 221 | |
| 222 | sources = [ |
| 223 | "run_all_unittests.cc", |
| 224 | "test_suite.cc", |
| 225 | "test_suite.h", |
| 226 | ] |
| 227 | |
| 228 | deps = [ |
| 229 | ":field_trial", |
| 230 | ":test_support", |
asapersson | 01d70a3 | 2016-05-20 06:29:46 -0700 | [diff] [blame] | 231 | "../system_wrappers:metrics_default", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 232 | "//testing/gmock", |
| 233 | "//testing/gtest", |
| 234 | "//third_party/gflags", |
| 235 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 236 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 237 | |
| 238 | # Depend on this target when you want to have test_support and a special |
| 239 | # main for mac which will run your test on a worker thread and consume |
| 240 | # events on the main thread. Useful if you want to access a webcam. |
| 241 | # This main will provide all the scaffolding and objective-c black magic |
| 242 | # for you. All you need to do is to implement a function in the |
| 243 | # run_threaded_main_mac.h file (ImplementThisToRunYourTest). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 244 | rtc_source_set("test_support_main_threaded_mac") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 245 | testonly = true |
| 246 | |
| 247 | sources = [ |
| 248 | "testsupport/mac/run_threaded_main_mac.h", |
| 249 | "testsupport/mac/run_threaded_main_mac.mm", |
| 250 | ] |
| 251 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 252 | deps = [ |
| 253 | ":test_support", |
| 254 | ] |
| 255 | } |
| 256 | |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 257 | if (is_android || is_ios) { |
| 258 | test_support_unittests_resources = [ |
| 259 | "//resources/foreman_cif_short.yuv", |
| 260 | "//resources/video_coding/frame-ethernet-ii.pcap", |
| 261 | "//resources/video_coding/frame-loopback.pcap", |
| 262 | "//resources/video_coding/pltype103.rtp", |
| 263 | "//resources/video_coding/pltype103_header_only.rtp", |
| 264 | "//resources/video_coding/ssrcs-2.pcap", |
| 265 | "//resources/video_coding/ssrcs-3.pcap", |
| 266 | ] |
| 267 | } |
| 268 | |
| 269 | if (is_ios) { |
| 270 | bundle_data("test_support_unittests_bundle_data") { |
| 271 | testonly = true |
| 272 | sources = test_support_unittests_resources |
| 273 | outputs = [ |
| 274 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 275 | ] |
| 276 | } |
| 277 | } |
| 278 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 279 | rtc_test("test_support_unittests") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 280 | deps = [] |
| 281 | sources = [ |
| 282 | "channel_transport/udp_socket_manager_unittest.cc", |
| 283 | "channel_transport/udp_socket_wrapper_unittest.cc", |
| 284 | "channel_transport/udp_transport_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 285 | "common_unittest.cc", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 286 | "fake_network_pipe_unittest.cc", |
| 287 | "frame_generator_unittest.cc", |
| 288 | "rtp_file_reader_unittest.cc", |
| 289 | "rtp_file_writer_unittest.cc", |
| 290 | "testsupport/always_passing_unittest.cc", |
| 291 | "testsupport/fileutils_unittest.cc", |
| 292 | "testsupport/frame_reader_unittest.cc", |
| 293 | "testsupport/frame_writer_unittest.cc", |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 294 | "testsupport/metrics/video_metrics_unittest.cc", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 295 | "testsupport/packet_reader_unittest.cc", |
| 296 | "testsupport/perf_test_unittest.cc", |
| 297 | "testsupport/unittest_utils.h", |
| 298 | ] |
| 299 | |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 300 | # TODO(jschuh): Bug 1348: fix this warning. |
| 301 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 302 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 303 | if (is_win) { |
kjellander | 8f4419b | 2016-06-02 02:09:52 -0700 | [diff] [blame] | 304 | cflags = [ "/wd4373" ] # virtual override w/different const/volatile signature. |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | if (is_clang) { |
| 308 | # Suppress warnings from the Chromium Clang plugin. |
| 309 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 310 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 311 | } |
| 312 | |
| 313 | if (is_android) { |
| 314 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 315 | data = test_support_unittests_resources |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 316 | shard_timeout = 900 |
| 317 | } |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 318 | |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 319 | if (is_ios) { |
| 320 | deps += [ ":test_support_unittests_bundle_data" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 321 | } |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 322 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 323 | deps += [ |
| 324 | ":channel_transport", |
| 325 | ":test_common", |
| 326 | ":test_support_main", |
| 327 | "../modules/video_capture", |
| 328 | "//testing/gmock", |
| 329 | "//testing/gtest", |
| 330 | ] |
| 331 | } |
| 332 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 333 | rtc_source_set("test_common") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 334 | testonly = true |
| 335 | sources = [ |
| 336 | "call_test.cc", |
| 337 | "call_test.h", |
| 338 | "configurable_frame_size_encoder.cc", |
| 339 | "configurable_frame_size_encoder.h", |
| 340 | "constants.cc", |
| 341 | "constants.h", |
| 342 | "direct_transport.cc", |
| 343 | "direct_transport.h", |
| 344 | "drifting_clock.cc", |
| 345 | "drifting_clock.h", |
| 346 | "encoder_settings.cc", |
| 347 | "encoder_settings.h", |
| 348 | "fake_audio_device.cc", |
| 349 | "fake_audio_device.h", |
| 350 | "fake_decoder.cc", |
| 351 | "fake_decoder.h", |
| 352 | "fake_encoder.cc", |
| 353 | "fake_encoder.h", |
| 354 | "fake_network_pipe.cc", |
| 355 | "fake_network_pipe.h", |
| 356 | "frame_generator_capturer.cc", |
| 357 | "frame_generator_capturer.h", |
| 358 | "layer_filtering_transport.cc", |
| 359 | "layer_filtering_transport.h", |
| 360 | "mock_transport.h", |
| 361 | "mock_voe_channel_proxy.h", |
| 362 | "mock_voice_engine.h", |
| 363 | "null_transport.cc", |
| 364 | "null_transport.h", |
| 365 | "rtp_rtcp_observer.h", |
| 366 | "statistics.cc", |
| 367 | "statistics.h", |
| 368 | "vcm_capturer.cc", |
| 369 | "vcm_capturer.h", |
| 370 | "video_capturer.cc", |
| 371 | "video_capturer.h", |
| 372 | "win/run_loop_win.cc", |
| 373 | ] |
| 374 | if (!is_win) { |
| 375 | sources += [ |
| 376 | "run_loop.cc", |
| 377 | "run_loop.h", |
| 378 | ] |
| 379 | } |
| 380 | |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 381 | if (is_clang && !is_nacl) { |
| 382 | # Suppress warnings from the Chromium Clang plugin. |
| 383 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 384 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 385 | } |
| 386 | |
| 387 | deps = [ |
| 388 | ":rtp_test_utils", |
| 389 | ":test_support", |
| 390 | ":video_test_common", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 391 | "..:webrtc_common", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 392 | "../audio", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 393 | "../base:rtc_base_approved", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 394 | "../call", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 395 | "../modules/media_file", |
kjellander | 94cee31 | 2016-06-10 01:56:57 -0700 | [diff] [blame] | 396 | "../video", |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 397 | "//testing/gmock", |
| 398 | "//testing/gtest", |
| 399 | "//third_party/gflags", |
| 400 | ] |
| 401 | } |
| 402 | |
| 403 | config("test_renderer_exported_config") { |
| 404 | if (is_win && is_clang) { |
| 405 | # GN orders flags on a target before flags from configs. The default config |
| 406 | # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 407 | # come from a config and cannot be on the target directly. |
ehmaldonado | 4bc4d27 | 2016-08-25 04:15:40 -0700 | [diff] [blame] | 408 | cflags = [ |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 409 | "-Wno-bool-conversion", |
| 410 | "-Wno-comment", |
| 411 | "-Wno-delete-non-virtual-dtor", |
| 412 | ] |
| 413 | } |
| 414 | } |
| 415 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 416 | rtc_source_set("test_renderer") { |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 417 | testonly = true |
| 418 | libs = [] |
| 419 | sources = [ |
| 420 | "linux/glx_renderer.cc", |
| 421 | "linux/glx_renderer.h", |
| 422 | "linux/video_renderer_linux.cc", |
| 423 | "mac/video_renderer_mac.h", |
| 424 | "mac/video_renderer_mac.mm", |
| 425 | "video_renderer.cc", |
| 426 | "video_renderer.h", |
| 427 | "win/d3d_renderer.cc", |
| 428 | "win/d3d_renderer.h", |
| 429 | ] |
| 430 | if (!is_linux && !is_mac && !is_win) { |
| 431 | sources += [ "null_platform_renderer.cc" ] |
| 432 | } |
| 433 | if (is_linux || is_mac) { |
| 434 | sources += [ |
| 435 | "gl/gl_renderer.cc", |
| 436 | "gl/gl_renderer.h", |
| 437 | ] |
| 438 | } |
| 439 | |
| 440 | if (is_linux) { |
| 441 | libs += [ |
| 442 | "Xext", |
| 443 | "X11", |
| 444 | "GL", |
| 445 | ] |
| 446 | } |
| 447 | if (is_android) { |
| 448 | libs += [ |
| 449 | "GLESv2", |
| 450 | "log", |
| 451 | ] |
| 452 | } |
| 453 | if (is_mac) { |
| 454 | libs = [ |
| 455 | "Cocoa.framework", |
| 456 | "OpenGL.framework", |
| 457 | "CoreVideo.framework", |
| 458 | ] |
| 459 | } |
| 460 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame^] | 461 | public_configs = [ ":test_renderer_exported_config" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 462 | |
| 463 | if (is_clang && !is_nacl) { |
| 464 | # Suppress warnings from the Chromium Clang plugin. |
| 465 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 466 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 0f380d8 | 2016-06-01 04:48:26 -0700 | [diff] [blame] | 467 | } |
| 468 | |
| 469 | deps = [ |
| 470 | ":test_support", |
| 471 | ":video_test_common", |
| 472 | "../modules/media_file", |
| 473 | "//testing/gtest", |
| 474 | ] |
| 475 | } |