Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("../webrtc.gni") | 9 import("../webrtc.gni") |
| 10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
| 11 if (is_android) { | 11 if (is_android) { |
| 12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
| 13 } | 13 } |
| 14 if (rtc_use_memcheck) { | 14 if (rtc_use_memcheck) { |
| 15 import("//tools-webrtc/valgrind/valgrind-webrtc.gni") | 15 import("//tools-webrtc/valgrind/valgrind-webrtc.gni") |
| 16 } | 16 } |
| 17 | 17 |
| 18 group("test") { | 18 group("test") { |
| 19 testonly = true | 19 testonly = true |
| 20 | 20 |
| 21 deps = [ | 21 deps = [ |
| 22 ":field_trial", | 22 ":field_trial", |
| 23 ":rtp_test_utils", | 23 ":rtp_test_utils", |
| 24 ":test_common", | 24 ":test_common", |
| 25 ":test_main", | |
| 26 ":test_renderer", | 25 ":test_renderer", |
| 27 ":test_support", | 26 ":test_support", |
| 28 ":test_support_unittests", | |
| 29 ":video_test_common", | 27 ":video_test_common", |
| 30 ] | 28 ] |
| 29 | |
| 30 if (!build_with_chromium) { | |
| 31 deps += [ | |
| 32 ":test_main", | |
| 33 ":test_support_unittests", | |
| 34 ] | |
| 35 } | |
| 31 } | 36 } |
| 32 | 37 |
| 33 rtc_source_set("video_test_common") { | 38 rtc_source_set("video_test_common") { |
| 34 testonly = true | 39 testonly = true |
| 35 sources = [ | 40 sources = [ |
| 36 "fake_texture_frame.cc", | 41 "fake_texture_frame.cc", |
| 37 "fake_texture_frame.h", | 42 "fake_texture_frame.h", |
| 38 "frame_generator.cc", | 43 "frame_generator.cc", |
| 39 "frame_generator.h", | 44 "frame_generator.h", |
| 40 "frame_generator_capturer.cc", | 45 "frame_generator_capturer.cc", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 "field_trial.h", | 94 "field_trial.h", |
| 90 ] | 95 ] |
| 91 | 96 |
| 92 deps = [ | 97 deps = [ |
| 93 "..:webrtc_common", | 98 "..:webrtc_common", |
| 94 "../system_wrappers", | 99 "../system_wrappers", |
| 95 "../system_wrappers:field_trial_default", | 100 "../system_wrappers:field_trial_default", |
| 96 ] | 101 ] |
| 97 } | 102 } |
| 98 | 103 |
| 99 test_support_unittests_resources = [ | 104 rtc_source_set("test_support") { |
| 100 "//resources/foreman_cif_short.yuv", | 105 testonly = true |
| 101 "//resources/video_coding/frame-ethernet-ii.pcap", | |
| 102 "//resources/video_coding/frame-loopback.pcap", | |
| 103 "//resources/video_coding/pltype103.rtp", | |
| 104 "//resources/video_coding/pltype103_header_only.rtp", | |
| 105 "//resources/video_coding/ssrcs-2.pcap", | |
| 106 "//resources/video_coding/ssrcs-3.pcap", | |
| 107 ] | |
| 108 | 106 |
| 109 if (is_ios) { | 107 sources = [ |
| 110 bundle_data("test_support_unittests_bundle_data") { | 108 "gmock.h", |
| 111 testonly = true | 109 "gtest.h", |
| 112 sources = test_support_unittests_resources | 110 "testsupport/packet_reader.cc", |
| 113 outputs = [ | 111 "testsupport/packet_reader.h", |
| 114 "{{bundle_resources_dir}}/{{source_file_part}}", | 112 "testsupport/perf_test.cc", |
| 115 ] | 113 "testsupport/perf_test.h", |
| 114 "testsupport/trace_to_stderr.cc", | |
| 115 "testsupport/trace_to_stderr.h", | |
| 116 "testsupport/unittest_utils.h", | |
| 117 ] | |
| 118 | |
| 119 deps = [ | |
| 120 "..:webrtc_common", | |
| 121 "../base:gtest_prod", | |
| 122 "../base:rtc_base_approved", | |
| 123 "../common_video", | |
| 124 "../system_wrappers", | |
| 125 "//testing/gmock", | |
| 126 "//testing/gtest", | |
| 127 ] | |
| 128 | |
| 129 public_deps = [ | |
| 130 ":fileutils", | |
| 131 ] | |
| 132 | |
| 133 if (!build_with_chromium && is_clang) { | |
| 134 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 135 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 136 } | |
| 137 | |
| 138 if (is_android) { | |
| 139 deps += [ "//base:base" ] | |
| 140 } | |
| 141 | |
| 142 if (is_ios && !build_with_chromium) { | |
|
kjellander_webrtc
2017/04/28 11:52:24
Actually, for the WebRTC build, this dependency sh
mbonadei
2017/04/28 11:54:33
Ok, I land this right away because I would like to
kjellander_webrtc
2017/04/28 12:24:49
After https://codereview.webrtc.org/2849823002/ we
| |
| 143 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] | |
| 144 } | |
| 145 | |
| 146 if (rtc_use_memcheck) { | |
| 147 data = valgrind_webrtc_dependencies | |
| 116 } | 148 } |
| 117 } | 149 } |
| 118 | 150 |
| 119 if (!build_with_chromium) { | 151 if (!build_with_chromium) { |
| 120 # This target depends on //third_party/gflags and since chromium does not | 152 # This target depends on //third_party/gflags and since chromium does not |
| 121 # have gflags it causes an error when Gn parses this BUILD.gn file. | 153 # have gflags it causes an error when Gn parses this BUILD.gn file. |
| 122 # It seems that Gn eagerly tries to understand if all the targets are | 154 # It seems that Gn eagerly tries to understand if all the targets are |
| 123 # buildable (even deps). Obviously gflags is not buildable in chromium | 155 # buildable (even deps). Obviously gflags is not buildable in chromium |
| 124 # so if a target depends on this BUILD.gn file we hit this error. | 156 # so if a target depends on this BUILD.gn file we hit this error. |
| 125 rtc_source_set("test_main") { | 157 rtc_source_set("test_main") { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 | 211 |
| 180 if (is_ios) { | 212 if (is_ios) { |
| 181 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] | 213 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] |
| 182 } | 214 } |
| 183 | 215 |
| 184 if (rtc_use_memcheck) { | 216 if (rtc_use_memcheck) { |
| 185 data = valgrind_webrtc_dependencies | 217 data = valgrind_webrtc_dependencies |
| 186 } | 218 } |
| 187 } | 219 } |
| 188 | 220 |
| 189 rtc_source_set("test_support") { | 221 rtc_source_set("test_support_isolated_output") { |
| 190 testonly = true | 222 testonly = true |
| 191 | |
| 192 sources = [ | 223 sources = [ |
| 193 "gmock.h", | |
| 194 "gtest.h", | |
| 195 "testsupport/isolated_output.cc", | 224 "testsupport/isolated_output.cc", |
| 196 "testsupport/isolated_output.h", | 225 "testsupport/isolated_output.h", |
| 197 "testsupport/packet_reader.cc", | |
| 198 "testsupport/packet_reader.h", | |
| 199 "testsupport/perf_test.cc", | |
| 200 "testsupport/perf_test.h", | |
| 201 "testsupport/trace_to_stderr.cc", | |
| 202 "testsupport/trace_to_stderr.h", | |
| 203 "testsupport/unittest_utils.h", | |
| 204 ] | 226 ] |
| 205 | |
| 206 deps = [ | 227 deps = [ |
| 207 "../base:gtest_prod", | 228 ":fileutils", |
| 208 "../base:rtc_base_approved", | 229 "../base:rtc_base_approved", |
| 209 "../common_video", | |
| 210 "../system_wrappers", | |
| 211 "//testing/gmock", | |
| 212 "//testing/gtest", | |
| 213 "//third_party/gflags", | 230 "//third_party/gflags", |
| 214 ] | 231 ] |
| 232 } | |
| 215 | 233 |
| 216 public_deps = [ | 234 test_support_unittests_resources = [ |
| 217 ":fileutils", | 235 "//resources/foreman_cif_short.yuv", |
| 218 ] | 236 "//resources/video_coding/frame-ethernet-ii.pcap", |
| 237 "//resources/video_coding/frame-loopback.pcap", | |
| 238 "//resources/video_coding/pltype103.rtp", | |
| 239 "//resources/video_coding/pltype103_header_only.rtp", | |
| 240 "//resources/video_coding/ssrcs-2.pcap", | |
| 241 "//resources/video_coding/ssrcs-3.pcap", | |
| 242 ] | |
| 219 | 243 |
| 220 if (!build_with_chromium && is_clang) { | 244 if (is_ios) { |
| 221 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 245 bundle_data("test_support_unittests_bundle_data") { |
| 222 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 246 testonly = true |
| 223 } | 247 sources = test_support_unittests_resources |
| 224 | 248 outputs = [ |
| 225 if (is_android) { | 249 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 226 deps += [ "//base:base" ] | 250 ] |
| 227 } | |
| 228 | |
| 229 if (is_ios) { | |
| 230 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] | |
| 231 } | |
| 232 | |
| 233 if (rtc_use_memcheck) { | |
| 234 data = valgrind_webrtc_dependencies | |
| 235 } | 251 } |
| 236 } | 252 } |
| 237 | 253 |
| 238 rtc_test("test_support_unittests") { | 254 rtc_test("test_support_unittests") { |
| 239 deps = [] | 255 deps = [] |
| 240 sources = [ | 256 sources = [ |
| 241 "fake_audio_device_unittest.cc", | 257 "fake_audio_device_unittest.cc", |
| 242 "fake_network_pipe_unittest.cc", | 258 "fake_network_pipe_unittest.cc", |
| 243 "frame_generator_unittest.cc", | 259 "frame_generator_unittest.cc", |
| 244 "rtp_file_reader_unittest.cc", | 260 "rtp_file_reader_unittest.cc", |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 274 | 290 |
| 275 if (is_ios) { | 291 if (is_ios) { |
| 276 deps += [ ":test_support_unittests_bundle_data" ] | 292 deps += [ ":test_support_unittests_bundle_data" ] |
| 277 } | 293 } |
| 278 | 294 |
| 279 deps += [ | 295 deps += [ |
| 280 ":direct_transport", | 296 ":direct_transport", |
| 281 ":fileutils_unittests", | 297 ":fileutils_unittests", |
| 282 ":test_common", | 298 ":test_common", |
| 283 ":test_main", | 299 ":test_main", |
| 300 ":test_support_isolated_output", | |
| 284 ":video_test_common", | 301 ":video_test_common", |
| 285 ":video_test_support", | 302 ":video_test_support", |
| 286 "../modules/video_capture", | 303 "../modules/video_capture", |
| 287 "//testing/gmock", | 304 "//testing/gmock", |
| 288 "//testing/gtest", | 305 "//testing/gtest", |
| 289 "//third_party/gflags", | 306 "//third_party/gflags", |
| 290 ] | 307 ] |
| 291 } | 308 } |
| 292 } | 309 } |
| 293 | 310 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 "../audio", | 433 "../audio", |
| 417 "../base:rtc_base_approved", | 434 "../base:rtc_base_approved", |
| 418 "../call", | 435 "../call", |
| 419 "../modules/audio_coding:builtin_audio_encoder_factory", | 436 "../modules/audio_coding:builtin_audio_encoder_factory", |
| 420 "../modules/audio_mixer:audio_mixer_impl", | 437 "../modules/audio_mixer:audio_mixer_impl", |
| 421 "../modules/audio_processing", | 438 "../modules/audio_processing", |
| 422 "../video", | 439 "../video", |
| 423 "//testing/gmock", | 440 "//testing/gmock", |
| 424 "//testing/gtest", | 441 "//testing/gtest", |
| 425 ] | 442 ] |
| 426 if (!is_android) { | 443 if (!is_android && !build_with_chromium) { |
| 427 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 444 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
| 428 } | 445 } |
| 429 } | 446 } |
| 430 | 447 |
| 431 config("test_renderer_exported_config") { | 448 config("test_renderer_exported_config") { |
| 432 if (is_win && is_clang) { | 449 if (is_win && is_clang) { |
| 433 # GN orders flags on a target before flags from configs. The default config | 450 # GN orders flags on a target before flags from configs. The default config |
| 434 # adds -Wall, and this flag have to be after -Wall -- so they need to | 451 # adds -Wall, and this flag have to be after -Wall -- so they need to |
| 435 # come from a config and cannot be on the target directly. | 452 # come from a config and cannot be on the target directly. |
| 436 cflags = [ | 453 cflags = [ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 ] | 517 ] |
| 501 } | 518 } |
| 502 | 519 |
| 503 rtc_source_set("audio_codec_mocks") { | 520 rtc_source_set("audio_codec_mocks") { |
| 504 testonly = true | 521 testonly = true |
| 505 sources = [ | 522 sources = [ |
| 506 "mock_audio_decoder.h", | 523 "mock_audio_decoder.h", |
| 507 "mock_audio_decoder_factory.h", | 524 "mock_audio_decoder_factory.h", |
| 508 ] | 525 ] |
| 509 } | 526 } |
| OLD | NEW |