fuchsia: Package setup for crashpad_test for in-Fuchsia build

third_party/googletest has been added to the Fuchsia manifest now (which
is a recent copy of googletest that includes googlemock). The BUILD.gn
file isn't there yet, but is in progress.

With these changes, all targets build in-Fuchsia once the googletest
BUILD.gn file lands.

Bug: crashpad:196
Change-Id: I34d2d7046dd2762b4d1f4873be97258df32adddf
Reviewed-on: https://chromium-review.googlesource.com/861242
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2018-01-12 17:21:48 -08:00 committed by Commit Bot
parent 1d1bf89d62
commit 970ac5a636
2 changed files with 39 additions and 10 deletions

View File

@ -19,7 +19,7 @@ config("crashpad_config") {
include_dirs = [ "." ]
}
if (crashpad_is_in_chromium) {
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
test("crashpad_tests") {
deps = [
"client:client_test",
@ -31,7 +31,25 @@ if (crashpad_is_in_chromium) {
"util:util_test",
]
}
} else {
if (crashpad_is_in_fuchsia) {
import("//build/package.gni")
package("crashpad_test") {
testonly = true
system_image = true
deps = [
":crashpad_tests",
]
tests = [
{
name = "crashpad_tests"
},
]
}
}
} else if (crashpad_is_standalone) {
test("crashpad_client_test") {
deps = [
"client:client_test",

View File

@ -32,13 +32,14 @@ if (crashpad_is_in_chromium) {
group("gtest") {
testonly = true
public_deps = [
"//third_party/gtest",
"//third_party/googletest:gtest",
]
}
group("gmock") {
testonly = true
# TODO(scottmg): Fuchsia doesn't have a third_party/gmock, and has a
# pre-gmock-integration gtest.
public_deps = [
"//third_party/googletest:gmock",
]
}
} else if (crashpad_is_standalone) {
config("gtest_private_config") {
@ -90,7 +91,9 @@ if (crashpad_is_in_chromium) {
]
sources -= [ "gtest/googletest/src/gtest-all.cc" ]
public_configs = [ ":gtest_public_config" ]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gtest_private_config" ]
}
@ -127,7 +130,9 @@ if (crashpad_is_in_chromium) {
"gtest/googletest/test/production.cc",
"gtest/googletest/test/production.h",
]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
@ -169,7 +174,9 @@ if (crashpad_is_in_chromium) {
"gtest/googletest/test/gtest-param-test_test.cc",
"gtest/googletest/test/gtest-param-test_test.h",
]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
@ -297,7 +304,9 @@ if (crashpad_is_in_chromium) {
]
sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_public_config" ]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gmock_private_config" ]
deps = [
":gtest",
@ -370,7 +379,9 @@ if (crashpad_is_in_chromium) {
sources = [
"gtest/googlemock/test/gmock_stress_test.cc",
]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gmock_private_config" ]
deps = [
":gmock",