diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 619f1d3d00..bcc88e7916 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -718,7 +718,7 @@ if (rtc_include_tests) { "modules/audio_coding:neteq_test_support", "modules/audio_processing", "modules/audio_processing:audioproc_test_utils", - "modules/remote_bitrate_estimator:bwe_simulator", + "modules/remote_bitrate_estimator:bwe_simulator_lib", "modules/rtp_rtcp", "test:test_common", "test:test_main", diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn index dc2c4c4317..28b8c383e0 100644 --- a/webrtc/modules/BUILD.gn +++ b/webrtc/modules/BUILD.gn @@ -627,7 +627,6 @@ if (rtc_include_tests) { "../test:rtp_test_utils", "../test:test_common", "../test:test_support_main", - "../test:test_support_main", "../test:video_test_common", "audio_coding", "audio_coding:acm_receive_test", @@ -650,7 +649,7 @@ if (rtc_include_tests) { "media_file", "pacing", "remote_bitrate_estimator", - "remote_bitrate_estimator:bwe_simulator", + "remote_bitrate_estimator:bwe_simulator_lib", "rtp_rtcp", "utility", "video_capture", @@ -705,4 +704,37 @@ if (rtc_include_tests) { ldflags = [ "-ObjC" ] } } + + rtc_test("bwe_simulator") { + testonly = true + + deps = [] + sources = [ + "remote_bitrate_estimator/bwe_simulations.cc", + ] + + if (is_clang) { + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] + } + + if (is_win) { + cflags = [ + # TODO(kjellander): bugs.webrtc.org/261: Fix this warning. + "/wd4373", # virtual function override. + ] + } + + deps += [ + "..:webrtc_common", + "../base:rtc_base_approved", + "../test:test_common", + "../test:test_support_main", + "remote_bitrate_estimator:bwe_simulator_lib", + "video_capture", + "//testing/gmock", + "//testing/gtest", + "//third_party/gflags", + ] + } } diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index 515376b2b2..bfa75a068d 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -52,10 +52,9 @@ rtc_static_library("remote_bitrate_estimator") { } if (rtc_include_tests) { - rtc_static_library("bwe_simulator") { + rtc_static_library("bwe_simulator_lib") { testonly = true sources = [ - "bwe_simulations.cc", "test/bwe.cc", "test/bwe.h", "test/bwe_test.cc", diff --git a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc index a3f2894863..c953bd83e0 100644 --- a/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc +++ b/webrtc/modules/remote_bitrate_estimator/bwe_simulations.cc @@ -22,7 +22,7 @@ namespace webrtc { namespace testing { namespace bwe { -#if BWE_TEST_LOGGING_COMPILE_TIME_ENABLE + // This test fixture is used to instantiate tests running with adaptive video // senders. class BweSimulation : public BweTest, @@ -445,7 +445,6 @@ TEST_P(BweSimulation, GccComparisonChoke) { gcc_test.RunChoke(kFullSendSideEstimator, capacities_kbps); } -#endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE } // namespace bwe } // namespace testing } // namespace webrtc