diff --git a/build_overrides/webrtc.gni b/build_overrides/webrtc.gni index a9bbdbf95b..7891f3fe98 100644 --- a/build_overrides/webrtc.gni +++ b/build_overrides/webrtc.gni @@ -22,3 +22,6 @@ rtc_include_pulse_audio = true # Chromium uses its own IO handling, so the internal ADM is only built for # standalone WebRTC. rtc_include_internal_audio_device = true + +# There's no point processing WebRTC standalone tests in a Chromium build. +rtc_include_tests = true diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 0c6db74022..bf2eee39e9 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -379,8 +379,7 @@ if (use_libfuzzer || use_drfuzz) { } } -# There's no point processing WebRTC standalone tests in a Chromium build. -if (!build_with_chromium) { +if (!rtc_include_tests) { config("rtc_unittests_config") { # GN orders flags on a target before flags from configs. The default config # adds -Wall, and this flag have to be after -Wall -- so they need to diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 7d2035db86..92aa2f6d3d 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -632,8 +632,7 @@ source_set("gtest_prod") { ] } -# There's no point processing WebRTC standalone tests in a Chromium build. -if (!build_with_chromium) { +if (!rtc_include_tests) { config("rtc_base_test_utils_exported_config") { defines = [ "GTEST_RELATIVE_PATH" ] } diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn index 1116419f1f..28c80f3c41 100644 --- a/webrtc/system_wrappers/BUILD.gn +++ b/webrtc/system_wrappers/BUILD.gn @@ -193,8 +193,7 @@ if (is_linux) { } } -# There's no point processing WebRTC standalone tests in a Chromium build. -if (!build_with_chromium) { +if (!rtc_include_tests) { test("system_wrappers_unittests") { testonly = true sources = [ diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn index a17ec76795..8e57cbfdac 100644 --- a/webrtc/tools/BUILD.gn +++ b/webrtc/tools/BUILD.gn @@ -170,8 +170,7 @@ source_set("agc_test_utils") { } # Exclude tools depending on gflags since that's not available in Chromium. -# There's no point processing WebRTC standalone tests in a Chromium build. -if (!build_with_chromium) { +if (!rtc_include_tests) { executable("agc_harness") { testonly = true sources = [