From e72db175568083c97528fcc74c37a35992c3bc44 Mon Sep 17 00:00:00 2001 From: kjellander Date: Mon, 6 Jun 2016 14:00:02 -0700 Subject: [PATCH] GN: Use rtc_include_tests variable to exclude tests. This is closer to what the GYP build does, and is more readable. BUG=webrtc:5949 TBR=phoglund@webrtc.org NOTRY=True Review-Url: https://codereview.webrtc.org/2043873003 Cr-Commit-Position: refs/heads/master@{#13054} --- build_overrides/webrtc.gni | 3 +++ webrtc/BUILD.gn | 3 +-- webrtc/base/BUILD.gn | 3 +-- webrtc/system_wrappers/BUILD.gn | 3 +-- webrtc/tools/BUILD.gn | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) 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 = [