From 1a6f143d077aec85d919c516b4f74ada8b8c21a8 Mon Sep 17 00:00:00 2001 From: mbonadei Date: Thu, 1 Jun 2017 04:25:40 -0700 Subject: [PATCH] Revert of Enabling `gn check` on webrtc/test (patchset #9 id:160001 of https://codereview.webrtc.org/2911203002/ ) Reason for revert: ERROR at //webrtc/test/testsupport/fileutils_unittest.cc:20:11: Can't include this header from here. #include "webrtc/base/checks.h" ^------------------- The target: //webrtc/test:fileutils_unittests is including a file from the target: //webrtc/base:rtc_base_approved It's usually best to depend directly on the destination target. In some cases, the destination target is considered a subcomponent of an intermediate target. In this case, the intermediate target should depend publicly on the destination to forward the ability to include headers. Dependency chain (there may also be others): //webrtc/test:fileutils_unittests --> //webrtc/test:fileutils --[private]--> //webrtc/base:rtc_base_approved Original issue's description: > Enabling `gn check` on webrtc/test > > BUG=webrtc:6828 > NOTRY=True > > Review-Url: https://codereview.webrtc.org/2911203002 > Cr-Commit-Position: refs/heads/master@{#18372} > Committed: https://chromium.googlesource.com/external/webrtc/+/db5bb404b0f42a7c0a43f882b34ba1325d8cbae2 TBR=kjellander@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:6828 Review-Url: https://codereview.webrtc.org/2920763002 Cr-Commit-Position: refs/heads/master@{#18375} --- .gn | 1 - webrtc/modules/audio_coding/BUILD.gn | 222 +++++++++++++-------------- webrtc/modules/audio_device/BUILD.gn | 26 ++-- webrtc/modules/rtp_rtcp/BUILD.gn | 30 ++-- webrtc/test/BUILD.gn | 60 +------- webrtc/test/fuzzers/BUILD.gn | 22 --- 6 files changed, 142 insertions(+), 219 deletions(-) diff --git a/.gn b/.gn index 70a0c3e45e..a6b4af7280 100644 --- a/.gn +++ b/.gn @@ -37,7 +37,6 @@ check_targets = [ "//webrtc/sdk/*", "//webrtc/stats/*", "//webrtc/system_wrappers/*", - "//webrtc/test/*", "//webrtc/tools/*", "//webrtc/video/*", "//webrtc/voice_engine/*", diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index 8f87576e8f..1b62973092 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -1103,118 +1103,6 @@ rtc_source_set("neteq_tools_minimal") { ] } -rtc_source_set("neteq_test_tools") { - testonly = true - sources = [ - "neteq/tools/audio_checksum.h", - "neteq/tools/audio_loop.cc", - "neteq/tools/audio_loop.h", - "neteq/tools/constant_pcm_packet_source.cc", - "neteq/tools/constant_pcm_packet_source.h", - "neteq/tools/output_audio_file.h", - "neteq/tools/output_wav_file.h", - "neteq/tools/rtp_file_source.cc", - "neteq/tools/rtp_file_source.h", - "neteq/tools/rtp_generator.cc", - "neteq/tools/rtp_generator.h", - ] - - public_configs = [ ":neteq_tools_config" ] - - 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" ] - } - - deps = [ - ":pcm16b", - "..:module_api", - "../..:webrtc_common", - "../../base:rtc_base_approved", - "../../base:rtc_base_tests_utils", - "../../common_audio", - "../../test:rtp_test_utils", - "../rtp_rtcp", - ] - - public_deps = [ - ":neteq_tools", - ":neteq_tools_minimal", - ] - - if (rtc_enable_protobuf) { - sources += [ - "neteq/tools/neteq_packet_source_input.cc", - "neteq/tools/neteq_packet_source_input.h", - ] - deps += [ ":rtc_event_log_source" ] - } -} - -config("neteq_tools_config") { - include_dirs = [ "tools" ] -} - -rtc_source_set("neteq_tools") { - sources = [ - "neteq/tools/fake_decode_from_file.cc", - "neteq/tools/fake_decode_from_file.h", - "neteq/tools/input_audio_file.cc", - "neteq/tools/input_audio_file.h", - "neteq/tools/neteq_replacement_input.cc", - "neteq/tools/neteq_replacement_input.h", - "neteq/tools/resample_input_audio_file.cc", - "neteq/tools/resample_input_audio_file.h", - ] - - public_configs = [ ":neteq_tools_config" ] - - 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" ] - } - - deps = [ - "../..:webrtc_common", - "../../api/audio_codecs:audio_codecs_api", - "../../base:rtc_base_approved", - "../../common_audio", - "../rtp_rtcp", - ] - - public_deps = [ - ":neteq_tools_minimal", - ] -} - -if (rtc_enable_protobuf) { - rtc_static_library("rtc_event_log_source") { - testonly = true - - # TODO(kjellander): Remove (bugs.webrtc.org/6828) - # Needs call.h to be moved to webrtc/api first. - check_includes = false - - sources = [ - "neteq/tools/rtc_event_log_source.cc", - "neteq/tools/rtc_event_log_source.h", - ] - - 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" ] - } - - deps = [ - "../../base:rtc_base_approved", - "../../logging:rtc_event_log_parser", - ] - public_deps = [ - "../../logging:rtc_event_log_proto", - ] - } -} - if (rtc_include_tests) { group("audio_coding_tests") { testonly = true @@ -1507,6 +1395,32 @@ if (rtc_include_tests) { proto_out_dir = "webrtc/modules/audio_coding/neteq" } + rtc_static_library("rtc_event_log_source") { + testonly = true + + # TODO(kjellander): Remove (bugs.webrtc.org/6828) + # Needs call.h to be moved to webrtc/api first. + check_includes = false + + sources = [ + "neteq/tools/rtc_event_log_source.cc", + "neteq/tools/rtc_event_log_source.h", + ] + + 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" ] + } + + deps = [ + "../../base:rtc_base_approved", + "../../logging:rtc_event_log_parser", + ] + public_deps = [ + "../../logging:rtc_event_log_proto", + ] + } + rtc_test("neteq_rtpplay") { testonly = true defines = [] @@ -1628,6 +1542,90 @@ if (rtc_include_tests) { ] } + config("neteq_tools_config") { + include_dirs = [ "tools" ] + } + + rtc_source_set("neteq_tools") { + sources = [ + "neteq/tools/fake_decode_from_file.cc", + "neteq/tools/fake_decode_from_file.h", + "neteq/tools/input_audio_file.cc", + "neteq/tools/input_audio_file.h", + "neteq/tools/neteq_replacement_input.cc", + "neteq/tools/neteq_replacement_input.h", + "neteq/tools/resample_input_audio_file.cc", + "neteq/tools/resample_input_audio_file.h", + ] + + public_configs = [ ":neteq_tools_config" ] + + 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" ] + } + + deps = [ + "../..:webrtc_common", + "../../api/audio_codecs:audio_codecs_api", + "../../base:rtc_base_approved", + "../../common_audio", + "../rtp_rtcp", + ] + + public_deps = [ + ":neteq_tools_minimal", + ] + } + + rtc_source_set("neteq_test_tools") { + testonly = true + sources = [ + "neteq/tools/audio_checksum.h", + "neteq/tools/audio_loop.cc", + "neteq/tools/audio_loop.h", + "neteq/tools/constant_pcm_packet_source.cc", + "neteq/tools/constant_pcm_packet_source.h", + "neteq/tools/output_audio_file.h", + "neteq/tools/output_wav_file.h", + "neteq/tools/rtp_file_source.cc", + "neteq/tools/rtp_file_source.h", + "neteq/tools/rtp_generator.cc", + "neteq/tools/rtp_generator.h", + ] + + public_configs = [ ":neteq_tools_config" ] + + 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" ] + } + + deps = [ + ":pcm16b", + "..:module_api", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../base:rtc_base_tests_utils", + "../../common_audio", + "../../test:rtp_test_utils", + "../rtp_rtcp", + ] + + public_deps = [ + ":neteq_tools", + ":neteq_tools_minimal", + ] + + if (rtc_enable_protobuf) { + sources += [ + "neteq/tools/neteq_packet_source_input.cc", + "neteq/tools/neteq_packet_source_input.h", + ] + deps += [ ":rtc_event_log_source" ] + } + } + rtc_source_set("neteq_test_tools_deprecated") { testonly = true sources = [ diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index 6476831d72..2f678d6dc0 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -254,19 +254,6 @@ config("mock_audio_device_config") { } } -rtc_source_set("mock_audio_device") { - testonly = true - sources = [ - "include/mock_audio_device.h", - "include/mock_audio_transport.h", - ] - deps = [ - ":audio_device", - "../../test:test_support", - ] - all_dependent_configs = [ ":mock_audio_device_config" ] -} - if (rtc_include_tests) { rtc_source_set("audio_device_unittests") { testonly = true @@ -322,6 +309,19 @@ if (rtc_include_tests) { } } + rtc_source_set("mock_audio_device") { + testonly = true + sources = [ + "include/mock_audio_device.h", + "include/mock_audio_transport.h", + ] + deps = [ + ":audio_device", + "../../test:test_support", + ] + all_dependent_configs = [ ":mock_audio_device_config" ] + } + if (!is_ios) { # These tests do not work on ios, see # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index a9e257ef6a..7f2d64fe53 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -211,21 +211,6 @@ rtc_source_set("fec_test_helper") { } } -rtc_source_set("mock_rtp_rtcp") { - testonly = true - sources = [ - "mocks/mock_recovered_packet_receiver.h", - "mocks/mock_rtcp_rtt_stats.h", - "mocks/mock_rtp_rtcp.h", - ] - deps = [ - ":rtp_rtcp", - "..:module_api", - "../../base:rtc_base_approved", - "../../test:test_support", - ] -} - if (rtc_include_tests) { rtc_executable("test_packet_masks_metrics") { testonly = true @@ -265,6 +250,21 @@ if (rtc_include_tests) { } } + rtc_source_set("mock_rtp_rtcp") { + testonly = true + sources = [ + "mocks/mock_recovered_packet_receiver.h", + "mocks/mock_rtcp_rtt_stats.h", + "mocks/mock_rtp_rtcp.h", + ] + deps = [ + ":rtp_rtcp", + "..:module_api", + "../../base:rtc_base_approved", + "../../test:test_support", + ] + } + rtc_source_set("rtp_rtcp_unittests") { testonly = true diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 9b42b25a38..bb04e199ca 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -58,14 +58,9 @@ rtc_source_set("video_test_common") { } deps = [ - "..:video_stream_api", - "..:webrtc_common", - "../base:rtc_base_approved", - "../base:rtc_task_queue", "../common_video", "../media:rtc_media_base", "../modules/video_capture:video_capture_module", - "../system_wrappers", ] } @@ -87,7 +82,6 @@ rtc_source_set("rtp_test_utils") { deps = [ "..:webrtc_common", - "../base:rtc_base_approved", "../modules/rtp_rtcp", "//testing/gtest", ] @@ -171,7 +165,6 @@ if (!build_with_chromium) { ] deps = [ ":field_trial", - "../base:rtc_base_approved", "../system_wrappers:metrics_default", "//testing/gmock", "//testing/gtest", @@ -195,9 +188,6 @@ if (!build_with_chromium) { ] deps = [ - ":test_support", - ":video_test_common", - "..:webrtc_common", "../base:rtc_base_approved", "../common_video", "../system_wrappers", @@ -262,16 +252,7 @@ if (!build_with_chromium) { } rtc_test("test_support_unittests") { - deps = [ - ":fake_audio_device", - ":rtp_test_utils", - "../api:video_frame_api", - "../base:rtc_base_approved", - "../call:call_interfaces", - "../common_audio", - "../modules/rtp_rtcp", - "../system_wrappers", - ] + deps = [] sources = [ "fake_audio_device_unittest.cc", "fake_network_pipe_unittest.cc", @@ -333,16 +314,11 @@ rtc_source_set("fileutils") { "testsupport/fileutils.cc", "testsupport/fileutils.h", ] - deps = [ - "..:webrtc_common", - "../base:rtc_base_approved", - ] if (is_ios) { sources += [ "testsupport/iosfileutils.mm" ] - deps += [ "../sdk:objc_common" ] - } - if (is_win) { - deps += [ "../base:rtc_base" ] + deps = [ + "../sdk:objc_common", + ] } visibility = [ ":*" ] } @@ -367,7 +343,6 @@ rtc_source_set("fileutils_unittests") { ] deps = [ ":fileutils", - ":test_support", "//testing/gmock", "//testing/gtest", ] @@ -386,12 +361,9 @@ rtc_source_set("direct_transport") { suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ - "..:webrtc_common", "../api:transport_api", "../base:rtc_base_approved", "../call", - "../modules/rtp_rtcp", - "../system_wrappers", ] } @@ -406,11 +378,8 @@ rtc_source_set("fake_audio_device") { suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ - "..:webrtc_common", "../base:rtc_base_approved", - "../common_audio:common_audio", "../modules/audio_device:audio_device", - "../system_wrappers:system_wrappers", ] } @@ -462,30 +431,15 @@ rtc_source_set("test_common") { ":rtp_test_utils", ":test_support", ":video_test_common", - "..:video_stream_api", "..:webrtc_common", - "../api:transport_api", - "../api:video_frame_api", - "../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory", "../api/video_codecs:video_codecs_api", "../audio", "../base:rtc_base_approved", - "../base:rtc_task_queue", "../call", - "../common_video", - "../logging:rtc_event_log_api", - "../modules/audio_device:mock_audio_device", "../modules/audio_mixer:audio_mixer_impl", "../modules/audio_processing", - "../modules/rtp_rtcp", - "../modules/rtp_rtcp:mock_rtp_rtcp", - "../modules/video_coding:webrtc_h264", - "../modules/video_coding:webrtc_vp8", - "../modules/video_coding:webrtc_vp9", - "../system_wrappers", "../video", - "../voice_engine", "//testing/gmock", "//testing/gtest", ] @@ -561,9 +515,6 @@ rtc_source_set("test_renderer") { deps = [ ":test_support", - "..:webrtc_common", - "../base:rtc_base_approved", - "../common_video", "../modules/media_file", "//testing/gtest", ] @@ -580,10 +531,7 @@ rtc_source_set("audio_codec_mocks") { ] deps = [ - ":test_support", "../api/audio_codecs:audio_codecs_api", - "../api/audio_codecs:builtin_audio_decoder_factory", - "../base:rtc_base_approved", "//testing/gmock", ] } diff --git a/webrtc/test/fuzzers/BUILD.gn b/webrtc/test/fuzzers/BUILD.gn index 6e5098e1fb..33c2c4792b 100644 --- a/webrtc/test/fuzzers/BUILD.gn +++ b/webrtc/test/fuzzers/BUILD.gn @@ -15,7 +15,6 @@ rtc_static_library("webrtc_fuzzer_main") { "webrtc_fuzzer_main.cc", ] deps = [ - "../../base:rtc_base_approved", "../../system_wrappers:field_trial_default", "../../system_wrappers:metrics_default", "//testing/libfuzzer:libfuzzer_main", @@ -65,7 +64,6 @@ webrtc_fuzzer_test("vp8_qp_parser_fuzzer") { "vp8_qp_parser_fuzzer.cc", ] deps = [ - "../../modules/video_coding:video_coding_utility", "../../modules/video_coding/", ] } @@ -75,7 +73,6 @@ webrtc_fuzzer_test("h264_bitstream_parser_fuzzer") { "h264_bitstream_parser_fuzzer.cc", ] deps = [ - "../../common_video", "../../modules/video_coding/", ] } @@ -85,7 +82,6 @@ webrtc_fuzzer_test("flexfec_header_reader_fuzzer") { "flexfec_header_reader_fuzzer.cc", ] deps = [ - "../../base:rtc_base_approved", "../../modules/rtp_rtcp", ] } @@ -96,7 +92,6 @@ webrtc_fuzzer_test("flexfec_sender_fuzzer") { ] deps = [ "../../modules/rtp_rtcp", - "../../system_wrappers", ] libfuzzer_options = [ "max_len=200" ] } @@ -106,7 +101,6 @@ webrtc_fuzzer_test("ulpfec_header_reader_fuzzer") { "ulpfec_header_reader_fuzzer.cc", ] deps = [ - "../../base:rtc_base_approved", "../../modules/rtp_rtcp", "../../modules/rtp_rtcp:fec_test_helper", ] @@ -128,7 +122,6 @@ webrtc_fuzzer_test("flexfec_receiver_fuzzer") { "flexfec_receiver_fuzzer.cc", ] deps = [ - "../../base:rtc_base_approved", "../../modules/rtp_rtcp", ] libfuzzer_options = [ "max_len=2000" ] @@ -140,7 +133,6 @@ webrtc_fuzzer_test("packet_buffer_fuzzer") { ] deps = [ "../../modules/video_coding/", - "../../system_wrappers", ] libfuzzer_options = [ "max_len=2000" ] } @@ -150,9 +142,7 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") { "rtcp_receiver_fuzzer.cc", ] deps = [ - "../../base:rtc_base_approved", "../../modules/rtp_rtcp", - "../../system_wrappers:system_wrappers", ] seed_corpus = "corpora/rtcp-corpus" } @@ -181,11 +171,8 @@ webrtc_fuzzer_test("congestion_controller_feedback_fuzzer") { "congestion_controller_feedback_fuzzer.cc", ] deps = [ - "../../logging:rtc_event_log_api", "../../logging:rtc_event_log_impl", "../../modules/congestion_controller/", - "../../modules/remote_bitrate_estimator:remote_bitrate_estimator", - "../../modules/rtp_rtcp", ] } @@ -194,12 +181,6 @@ rtc_static_library("audio_decoder_fuzzer") { "audio_decoder_fuzzer.cc", "audio_decoder_fuzzer.h", ] - deps = [ - "../..:webrtc_common", - "../../api/audio_codecs:audio_codecs_api", - "../../base:rtc_base_approved", - "../../modules/rtp_rtcp", - ] } webrtc_fuzzer_test("audio_decoder_ilbc_fuzzer") { @@ -279,7 +260,6 @@ webrtc_fuzzer_test("neteq_rtp_fuzzer") { "../../base:rtc_base_approved", "../../base:rtc_base_tests_utils", "../../modules/audio_coding:neteq", - "../../modules/audio_coding:neteq_test_tools", "../../modules/audio_coding:neteq_tools_minimal", "../../modules/audio_coding:pcm16b", "../../modules/rtp_rtcp", @@ -333,7 +313,6 @@ webrtc_fuzzer_test("pseudotcp_parser_fuzzer") { "pseudotcp_parser_fuzzer.cc", ] deps = [ - "../../base:rtc_base", "../../p2p:rtc_p2p", ] } @@ -343,7 +322,6 @@ webrtc_fuzzer_test("transport_feedback_packet_loss_tracker_fuzzer") { "transport_feedback_packet_loss_tracker_fuzzer.cc", ] deps = [ - "../../base:rtc_base_approved", "../../modules/rtp_rtcp", "../../voice_engine", ]