diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 6ed25c459f..bde2b86ae1 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -282,7 +282,6 @@ if (!build_with_chromium) { ":video_engine_tests", ":webrtc_nonparallel_tests", ":webrtc_perf_tests", - "api:rtc_api_unittests", "base:rtc_base_tests_utils", "common_audio:common_audio_unittests", "common_video:common_video_unittests", @@ -303,7 +302,6 @@ if (!build_with_chromium) { "test", "video:screenshare_loopback", "video:video_loopback", - "video:video_tests", "voice_engine:voice_engine_unittests", ] if (is_android) { @@ -475,7 +473,6 @@ if (rtc_include_tests) { "modules/remote_bitrate_estimator:remote_bitrate_estimator_perf_tests", "test:test_main", "video:video_full_stack_tests", - "video:video_quality_test", ] data = webrtc_perf_tests_resources diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index fdd441a5d5..b8ad90505f 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -243,6 +243,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_api_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "ortc/mediadescription_unittest.cc", "ortc/sessiondescription_unittest.cc", diff --git a/webrtc/audio/BUILD.gn b/webrtc/audio/BUILD.gn index 0de4229c7b..b3d4e1d89e 100644 --- a/webrtc/audio/BUILD.gn +++ b/webrtc/audio/BUILD.gn @@ -54,6 +54,13 @@ if (rtc_include_tests) { rtc_source_set("audio_tests") { testonly = true + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:video_engine_tests" ] + } + # TODO(kjellander): Remove (bugs.webrtc.org/6828) # This needs remote_bitrate_estimator to be moved to webrtc/api first. check_includes = false diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 2a990e8ec2..6014809661 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -742,6 +742,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_base_nonparallel_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_nonparallel_tests" ] + } sources = [ "cpu_time_unittest.cc", "filerotatingstream_unittest.cc", @@ -769,6 +776,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_base_approved_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "array_view_unittest.cc", "atomicops_unittest.cc", @@ -820,6 +834,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_task_queue_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "sequenced_task_checker_unittest.cc", "task_queue_unittest.cc", @@ -837,6 +858,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_numerics_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "numerics/exp_filter_unittest.cc", "numerics/percentile_filter_unittest.cc", @@ -854,6 +882,13 @@ if (rtc_include_tests) { } rtc_source_set("rtc_base_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "callback_unittest.cc", "crc32_unittest.cc", diff --git a/webrtc/call/BUILD.gn b/webrtc/call/BUILD.gn index b56b4a20f6..9cc3c18638 100644 --- a/webrtc/call/BUILD.gn +++ b/webrtc/call/BUILD.gn @@ -73,6 +73,13 @@ rtc_static_library("call") { if (rtc_include_tests) { rtc_source_set("call_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:video_engine_tests" ] + } sources = [ "bitrate_allocator_unittest.cc", "bitrate_estimator_tests.cc", @@ -105,6 +112,13 @@ if (rtc_include_tests) { rtc_source_set("call_perf_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } sources = [ "call_perf_tests.cc", "rampup_tests.cc", diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index 9c7e5eec55..4a2fdcaf87 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -1168,6 +1168,13 @@ if (rtc_include_tests) { rtc_source_set("audio_coding_modules_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } sources = [ "test/APITest.cc", "test/Channel.cc", @@ -1212,6 +1219,13 @@ if (rtc_include_tests) { rtc_source_set("audio_coding_perf_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } sources = [ "codecs/opus/opus_complexity_unittest.cc", "neteq/test/neteq_performance_unittest.cc", @@ -2015,6 +2029,12 @@ if (rtc_include_tests) { rtc_source_set("audio_coding_unittests") { testonly = true + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "acm2/acm_receiver_unittest.cc", "acm2/audio_coding_module_unittest.cc", diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn index 428bcac03c..fc9904c23b 100644 --- a/webrtc/modules/audio_conference_mixer/BUILD.gn +++ b/webrtc/modules/audio_conference_mixer/BUILD.gn @@ -50,6 +50,13 @@ rtc_static_library("audio_conference_mixer") { if (rtc_include_tests) { rtc_source_set("audio_conference_mixer_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "test/audio_conference_mixer_unittest.cc", ] diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index da05f5f11f..1e691fa9bc 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -255,6 +255,13 @@ config("mock_audio_device_config") { if (rtc_include_tests) { rtc_source_set("audio_device_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "fine_audio_buffer_unittest.cc", ] diff --git a/webrtc/modules/audio_mixer/BUILD.gn b/webrtc/modules/audio_mixer/BUILD.gn index b38769c882..d8acc05a4a 100644 --- a/webrtc/modules/audio_mixer/BUILD.gn +++ b/webrtc/modules/audio_mixer/BUILD.gn @@ -66,6 +66,13 @@ rtc_static_library("audio_frame_manipulator") { if (rtc_include_tests) { rtc_source_set("audio_mixer_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "audio_frame_manipulator_unittest.cc", "audio_mixer_impl_unittest.cc", diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn index 5686dc6690..0f6de09052 100644 --- a/webrtc/modules/audio_processing/BUILD.gn +++ b/webrtc/modules/audio_processing/BUILD.gn @@ -485,6 +485,13 @@ if (rtc_include_tests) { rtc_source_set("audio_processing_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "aec/echo_cancellation_unittest.cc", "aec/system_delay_unittest.cc", @@ -651,6 +658,13 @@ if (rtc_include_tests) { # //webrtc/modules:_modules_unittests__library check_includes = false testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } sources = [ "audio_processing_performance_unittest.cc", "level_controller/level_controller_complexity_unittest.cc", diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn index 58398f367f..33a28869ba 100644 --- a/webrtc/modules/bitrate_controller/BUILD.gn +++ b/webrtc/modules/bitrate_controller/BUILD.gn @@ -46,6 +46,13 @@ rtc_static_library("bitrate_controller") { if (rtc_include_tests) { rtc_source_set("bitrate_controller_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "bitrate_controller_unittest.cc", "send_side_bandwidth_estimation_unittest.cc", diff --git a/webrtc/modules/congestion_controller/BUILD.gn b/webrtc/modules/congestion_controller/BUILD.gn index b57d606a52..647079a382 100644 --- a/webrtc/modules/congestion_controller/BUILD.gn +++ b/webrtc/modules/congestion_controller/BUILD.gn @@ -62,6 +62,13 @@ rtc_static_library("congestion_controller") { if (rtc_include_tests) { rtc_source_set("congestion_controller_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "congestion_controller_unittest.cc", "congestion_controller_unittests_helper.cc", @@ -83,8 +90,8 @@ if (rtc_include_tests) { "../../test:test_support", "../bitrate_controller:bitrate_controller", "../pacing:pacing", + "../remote_bitrate_estimator:mock_remote_bitrate_observer", "../remote_bitrate_estimator:remote_bitrate_estimator", - "../remote_bitrate_estimator:remote_bitrate_estimator_unittests", "../rtp_rtcp:rtp_rtcp", "//testing/gmock", ] diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn index 35ca3a447f..5854b3438a 100644 --- a/webrtc/modules/desktop_capture/BUILD.gn +++ b/webrtc/modules/desktop_capture/BUILD.gn @@ -35,6 +35,13 @@ rtc_static_library("primitives") { if (rtc_include_tests) { rtc_source_set("desktop_capture_modules_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } sources = [] deps = [] if (rtc_desktop_capture_supported) { @@ -57,6 +64,13 @@ if (rtc_include_tests) { rtc_source_set("desktop_capture_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "blank_detector_desktop_capturer_wrapper_unittest.cc", "desktop_and_cursor_composer_unittest.cc", diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn index 32825afb2b..4f8fbbc4e2 100644 --- a/webrtc/modules/media_file/BUILD.gn +++ b/webrtc/modules/media_file/BUILD.gn @@ -43,6 +43,13 @@ rtc_static_library("media_file") { if (rtc_include_tests) { rtc_source_set("media_file_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "media_file_unittest.cc", ] diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn index d1cf656e6d..ce2356e28a 100644 --- a/webrtc/modules/pacing/BUILD.gn +++ b/webrtc/modules/pacing/BUILD.gn @@ -39,6 +39,13 @@ rtc_static_library("pacing") { if (rtc_include_tests) { rtc_source_set("pacing_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "alr_detector_unittest.cc", "bitrate_prober_unittest.cc", @@ -52,7 +59,7 @@ if (rtc_include_tests) { "../../system_wrappers:system_wrappers", "../../test:test_support", "../rtp_rtcp", - "../rtp_rtcp:rtp_rtcp_unittests", + "../rtp_rtcp:mock_rtp_rtcp", "//testing/gmock", ] diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index 702d3e7b9c..c2e5d31492 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -127,6 +127,13 @@ if (rtc_include_tests) { rtc_source_set("remote_bitrate_estimator_perf_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } sources = [ "remote_bitrate_estimators_test.cc", ] @@ -144,9 +151,15 @@ if (rtc_include_tests) { rtc_source_set("remote_bitrate_estimator_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "aimd_rate_control_unittest.cc", - "include/mock/mock_remote_bitrate_observer.h", "inter_arrival_unittest.cc", "overuse_detector_unittest.cc", "remote_bitrate_estimator_abs_send_time_unittest.cc", @@ -162,6 +175,7 @@ if (rtc_include_tests) { ] deps = [ ":bwe_simulator_lib", + ":mock_remote_bitrate_observer", ":remote_bitrate_estimator", "../..:webrtc_common", "../../base:rtc_base", @@ -185,6 +199,17 @@ if (rtc_include_tests) { } } + rtc_source_set("mock_remote_bitrate_observer") { + testonly = true + sources = [ + "include/mock/mock_remote_bitrate_observer.h", + ] + deps = [ + ":remote_bitrate_estimator", + "../../test:test_support", + ] + } + rtc_test("bwe_simulations_tests") { testonly = true diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index ec1766641e..a369218a68 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -192,6 +192,25 @@ rtc_static_library("rtp_rtcp") { } } +rtc_source_set("fec_test_helper") { + testonly = true + sources = [ + "source/fec_test_helper.cc", + "source/fec_test_helper.h", + ] + deps = [ + ":rtp_rtcp", + "../../base:rtc_base_approved", + ] + + # TODO(jschuh): bugs.webrtc.org/1348: fix this warning. + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + if (!build_with_chromium && is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } +} + if (rtc_include_tests) { rtc_executable("test_packet_masks_metrics") { testonly = true @@ -210,6 +229,13 @@ if (rtc_include_tests) { rtc_source_set("rtp_rtcp_modules_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } sources = [ "test/testFec/test_fec.cc", ] @@ -224,13 +250,29 @@ if (rtc_include_tests) { } } - rtc_source_set("rtp_rtcp_unittests") { + rtc_source_set("mock_rtp_rtcp") { testonly = true sources = [ "mocks/mock_rtp_rtcp.h", + ] + deps = [ + ":rtp_rtcp", + "../../base:rtc_base_approved", + "../../test:test_support", + ] + } + + rtc_source_set("rtp_rtcp_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } + sources = [ "source/byte_io_unittest.cc", - "source/fec_test_helper.cc", - "source/fec_test_helper.h", "source/flexfec_header_reader_writer_unittest.cc", "source/flexfec_receiver_unittest.cc", "source/flexfec_sender_unittest.cc", @@ -291,6 +333,8 @@ if (rtc_include_tests) { "test/testAPI/test_api_video.cc", ] deps = [ + ":fec_test_helper", + ":mock_rtp_rtcp", ":rtp_rtcp", "../..:webrtc_common", "../../api:transport_api", diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn index ae042d4c22..3d32ac27d5 100644 --- a/webrtc/modules/utility/BUILD.gn +++ b/webrtc/modules/utility/BUILD.gn @@ -42,6 +42,13 @@ rtc_static_library("utility") { if (rtc_include_tests) { rtc_source_set("utility_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "source/process_thread_impl_unittest.cc", ] diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index 9b611bb72f..821e3960cd 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -379,6 +379,12 @@ if (rtc_include_tests) { rtc_source_set("video_coding_modules_tests") { testonly = true + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_tests" ] + } sources = [ "codecs/h264/test/h264_impl_unittest.cc", "codecs/test/videoprocessor_integrationtest.cc", @@ -479,6 +485,13 @@ if (rtc_include_tests) { rtc_source_set("video_coding_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "codecs/test/packet_manipulator_unittest.cc", "codecs/test/stats_unittest.cc", diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn index e43c88cbda..7c9391a6d4 100644 --- a/webrtc/modules/video_processing/BUILD.gn +++ b/webrtc/modules/video_processing/BUILD.gn @@ -98,6 +98,13 @@ if (rtc_build_with_neon) { if (rtc_include_tests) { rtc_source_set("video_processing_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/modules:modules_unittests" ] + } sources = [ "test/denoiser_test.cc", ] diff --git a/webrtc/p2p/BUILD.gn b/webrtc/p2p/BUILD.gn index e4770cc462..f7d59058ba 100644 --- a/webrtc/p2p/BUILD.gn +++ b/webrtc/p2p/BUILD.gn @@ -165,6 +165,13 @@ if (rtc_include_tests) { rtc_source_set("rtc_p2p_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "base/asyncstuntcpsocket_unittest.cc", "base/dtlstransportchannel_unittest.cc", @@ -238,6 +245,13 @@ rtc_static_library("libstunprober") { if (rtc_include_tests) { rtc_source_set("libstunprober_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "stunprober/stunprober_unittest.cc", ] diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn index 721580d872..a352f9c65a 100644 --- a/webrtc/sdk/BUILD.gn +++ b/webrtc/sdk/BUILD.gn @@ -263,6 +263,13 @@ if (is_ios || is_mac) { if (rtc_include_tests) { rtc_source_set("rtc_sdk_peerconnection_objc_unittests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:rtc_unittests" ] + } sources = [ "objc/Framework/UnitTests/RTCConfigurationTest.mm", "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 36f3ba2f4a..d7c1f8a4e4 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -308,6 +308,7 @@ rtc_test("test_support_unittests") { } rtc_source_set("fileutils_unittests") { testonly = true + visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ "testsupport/fileutils_unittest.cc", ] diff --git a/webrtc/test/fuzzers/BUILD.gn b/webrtc/test/fuzzers/BUILD.gn index 031ed8b342..74ea607ae2 100644 --- a/webrtc/test/fuzzers/BUILD.gn +++ b/webrtc/test/fuzzers/BUILD.gn @@ -82,7 +82,7 @@ webrtc_fuzzer_test("flexfec_header_reader_fuzzer") { "flexfec_header_reader_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] } @@ -91,7 +91,7 @@ webrtc_fuzzer_test("flexfec_sender_fuzzer") { "flexfec_sender_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] libfuzzer_options = [ "max_len=200" ] } @@ -101,7 +101,8 @@ webrtc_fuzzer_test("ulpfec_header_reader_fuzzer") { "ulpfec_header_reader_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", + "../../modules/rtp_rtcp:fec_test_helper", ] } @@ -110,7 +111,9 @@ webrtc_fuzzer_test("ulpfec_generator_fuzzer") { "ulpfec_generator_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../base:rtc_base_approved", + "../../modules/rtp_rtcp", + "../../modules/rtp_rtcp:fec_test_helper", ] } @@ -119,7 +122,7 @@ webrtc_fuzzer_test("flexfec_receiver_fuzzer") { "flexfec_receiver_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] libfuzzer_options = [ "max_len=2000" ] } @@ -139,7 +142,7 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") { "rtcp_receiver_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] seed_corpus = "corpora/rtcp-corpus" } @@ -149,7 +152,7 @@ webrtc_fuzzer_test("rtp_packet_fuzzer") { "rtp_packet_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] seed_corpus = "corpora/rtp-corpus" } @@ -159,7 +162,7 @@ webrtc_fuzzer_test("rtp_header_fuzzer") { "rtp_header_fuzzer.cc", ] deps = [ - "../../modules/rtp_rtcp/", + "../../modules/rtp_rtcp", ] } diff --git a/webrtc/tools/network_tester/BUILD.gn b/webrtc/tools/network_tester/BUILD.gn index 1e290f60cf..5fd3ac9b7f 100644 --- a/webrtc/tools/network_tester/BUILD.gn +++ b/webrtc/tools/network_tester/BUILD.gn @@ -68,11 +68,18 @@ if (rtc_enable_protobuf) { } rtc_source_set("network_tester_unittests") { + testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc/tools:tools_unittests" ] + } sources = [ "network_tester_unittest.cc", ] - testonly = true deps = [ ":network_tester", "//testing/gtest", diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn index 52afc93064..20b5d109bd 100644 --- a/webrtc/video/BUILD.gn +++ b/webrtc/video/BUILD.gn @@ -82,6 +82,7 @@ rtc_static_library("video") { if (rtc_include_tests) { rtc_source_set("video_quality_test") { testonly = true + visibility = [ ":*" ] # Only targets in this file can depend on this. sources = [ "video_quality_test.cc", "video_quality_test.h", @@ -114,6 +115,13 @@ if (rtc_include_tests) { rtc_source_set("video_full_stack_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:webrtc_perf_tests" ] + } sources = [ "full_stack_tests.cc", ] @@ -213,6 +221,13 @@ if (rtc_include_tests) { # TODO(pbos): Rename test suite. rtc_source_set("video_tests") { testonly = true + + # Skip restricting visibility on mobile platforms since the tests on those + # gets additional generated targets which would require many lines here to + # cover (which would be confusing to read and hard to maintain). + if (!is_android && !is_ios) { + visibility = [ "//webrtc:video_engine_tests" ] + } defines = [] sources = [ "call_stats_unittest.cc", @@ -245,7 +260,7 @@ if (rtc_include_tests) { "../media:rtc_media_tests_utils", "../modules/pacing", "../modules/rtp_rtcp", - "../modules/rtp_rtcp:rtp_rtcp_unittests", + "../modules/rtp_rtcp:mock_rtp_rtcp", "../modules/utility", "../modules/video_coding", "../modules/video_coding:video_coding_utility",