Commit 6fca7d9a authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[absl] Make 'testing' import chromium-only

Guard the 'testing' import (and therefore all tests) behind
build_with_chromium, so that projects using the chromium absl build
(e.g. V8) don't have to add a dependency on 'testing'.

Change-Id: Ie4427fe1aebddd14a0c773fa1bc5938e56d6d193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461312
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: default avatarMirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815552}
parent 30b231dd
......@@ -10,7 +10,6 @@ import("//build/config/c++/c++.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/toolchain/toolchain.gni")
import("//build_overrides/build.gni")
import("//testing/test.gni")
import("//third_party/abseil-cpp/absl.gni")
config("absl_component_build") {
......@@ -178,7 +177,10 @@ config("absl_test_cflags_cc") {
}
}
if (!is_component_build) {
if (build_with_chromium) {
import("//testing/test.gni")
if (!is_component_build) {
test("absl_tests") {
testonly = true
deps = [
......@@ -197,9 +199,8 @@ if (!is_component_build) {
"//third_party/googletest:gtest_main",
]
}
}
}
if (build_with_chromium) {
test("absl_hardening_tests") {
testonly = true
sources = [ "absl_hardening_test.cc" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment