GN: Refactor so that WebRTC compiles with rtc_enable_protobuf=false.

This is a first step towards it. I plan to refactor modules_unittests before continuing with this.

BUG=webrtc:6626
NOTRY=True

Review-Url: https://codereview.webrtc.org/2626163004
Cr-Commit-Position: refs/heads/master@{#16109}
This commit is contained in:
ehmaldonado
2017-01-17 02:37:34 -08:00
committed by Commit bot
parent ece0571d44
commit 1fd08c1e67
3 changed files with 77 additions and 73 deletions

View File

@ -55,30 +55,6 @@ rtc_static_library("rtc_event_log_impl") {
}
}
if (rtc_include_tests) {
rtc_source_set("rtc_event_log_tests") {
testonly = true
sources = [
"rtc_event_log/ringbuffer_unittest.cc",
"rtc_event_log/rtc_event_log_unittest.cc",
"rtc_event_log/rtc_event_log_unittest_helper.cc",
]
deps = [
":rtc_event_log_impl",
":rtc_event_log_parser",
"../call",
"../modules/rtp_rtcp",
"../system_wrappers:metrics_default",
"//testing/gmock",
"//testing/gtest",
]
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_enable_protobuf) {
proto_library("rtc_event_log_proto") {
sources = [
@ -86,9 +62,7 @@ if (rtc_enable_protobuf) {
]
proto_out_dir = "webrtc/logging/rtc_event_log"
}
}
if (rtc_enable_protobuf) {
rtc_static_library("rtc_event_log_parser") {
sources = [
"rtc_event_log/rtc_event_log_parser.cc",
@ -105,4 +79,28 @@ if (rtc_enable_protobuf) {
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
if (rtc_include_tests) {
rtc_source_set("rtc_event_log_tests") {
testonly = true
sources = [
"rtc_event_log/ringbuffer_unittest.cc",
"rtc_event_log/rtc_event_log_unittest.cc",
"rtc_event_log/rtc_event_log_unittest_helper.cc",
]
deps = [
":rtc_event_log_impl",
":rtc_event_log_parser",
"../call",
"../modules/rtp_rtcp",
"../system_wrappers:metrics_default",
"//testing/gmock",
"//testing/gtest",
]
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" ]
}
}
}
}

View File

@ -396,12 +396,10 @@ if (rtc_include_tests) {
group("audio_processing_tests") {
testonly = true
public_deps = [
":audioproc_f",
":audioproc_test_utils",
":click_annotate",
":nonlinear_beamformer_test",
":transient_suppression_test",
":unpack_aecdump",
]
if (rtc_enable_intelligibility_enhancer) {
@ -409,7 +407,11 @@ if (rtc_include_tests) {
}
if (rtc_enable_protobuf) {
public_deps += [ ":audioproc_unittest_proto" ]
public_deps += [
":audioproc_f",
":audioproc_unittest_proto",
":unpack_aecdump",
]
}
}
@ -442,51 +444,53 @@ if (rtc_include_tests) {
}
}
rtc_executable("unpack_aecdump") {
testonly = true
sources = [
"test/unpack.cc",
]
if (rtc_enable_protobuf) {
rtc_executable("unpack_aecdump") {
testonly = true
sources = [
"test/unpack.cc",
]
deps = [
":audio_processing",
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
"../..:webrtc_common",
"../../base:rtc_base_approved",
"../../common_audio",
"../../system_wrappers:system_wrappers_default",
"//third_party/gflags:gflags",
]
} # unpack_aecdump
deps = [
":audio_processing",
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
"../..:webrtc_common",
"../../base:rtc_base_approved",
"../../common_audio",
"../../system_wrappers:system_wrappers_default",
"//third_party/gflags:gflags",
]
} # unpack_aecdump
rtc_executable("audioproc_f") {
testonly = true
sources = [
"test/aec_dump_based_simulator.cc",
"test/aec_dump_based_simulator.h",
"test/audio_processing_simulator.cc",
"test/audio_processing_simulator.h",
"test/audioproc_float.cc",
"test/wav_based_simulator.cc",
"test/wav_based_simulator.h",
]
rtc_executable("audioproc_f") {
testonly = true
sources = [
"test/aec_dump_based_simulator.cc",
"test/aec_dump_based_simulator.h",
"test/audio_processing_simulator.cc",
"test/audio_processing_simulator.h",
"test/audioproc_float.cc",
"test/wav_based_simulator.cc",
"test/wav_based_simulator.h",
]
deps = [
":audio_processing",
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
"../../base:rtc_base_approved",
"../../common_audio:common_audio",
"../../system_wrappers",
"../../system_wrappers:system_wrappers_default",
"../../test:test_support",
"//testing/gtest",
"//third_party/gflags:gflags",
]
} # audioproc_f
deps = [
":audio_processing",
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
"../../base:rtc_base_approved",
"../../common_audio:common_audio",
"../../system_wrappers",
"../../system_wrappers:system_wrappers_default",
"../../test:test_support",
"//testing/gtest",
"//third_party/gflags:gflags",
]
} # audioproc_f
}
rtc_source_set("audioproc_test_utils") {
testonly = true

View File

@ -30,11 +30,13 @@ group("tools") {
if (rtc_include_tests) {
public_deps += [
":activity_metric",
":rtp_analyzer",
":tools_unittests",
]
if (rtc_enable_protobuf) {
public_deps += [ ":event_log_visualizer" ]
public_deps += [
":event_log_visualizer",
":rtp_analyzer",
]
}
}
}