Scott Graham 9de3535bbb fuchsia: Re-add launchpad for now
launchpad usage directly in Crashpad was removed, but gtest still uses
launchpad (for death tests) so keep it here for now (until the gtest
upstream change has landed to remove launchpad there).

Also, roll mini_chromium and remove link of zircon, since that's in the
base configuration now.

Bug: crashpad:196
Change-Id: I68b1092aaa6fc31efe693e3fcd5bde71c2d91d42
Reviewed-on: https://chromium-review.googlesource.com/1083611
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
2018-06-02 00:01:54 +00:00

411 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("../../build/crashpad_buildconfig.gni")
import("../../build/test.gni")
if (crashpad_is_in_chromium) {
group("gtest") {
testonly = true
public_deps = [
"//testing/gtest",
]
}
group("gmock") {
testonly = true
public_deps = [
"//testing/gmock",
]
}
} else if (crashpad_is_in_fuchsia) {
group("gtest") {
testonly = true
public_deps = [
"//third_party/googletest:gtest",
]
}
group("gmock") {
testonly = true
public_deps = [
"//third_party/googletest:gmock",
]
}
} else if (crashpad_is_standalone) {
config("gtest_private_config") {
visibility = [ ":*" ]
include_dirs = [ "gtest/googletest" ]
defines = [ "GUNIT_NO_GOOGLE3=1" ]
if (crashpad_is_fuchsia) {
libs = [ "launchpad" ]
}
}
config("gtest_public_config") {
include_dirs = [ "gtest/googletest/include" ]
}
static_library("gtest") {
testonly = true
sources = [
"gtest/googletest/include/gtest/gtest-death-test.h",
"gtest/googletest/include/gtest/gtest-message.h",
"gtest/googletest/include/gtest/gtest-param-test.h",
"gtest/googletest/include/gtest/gtest-printers.h",
"gtest/googletest/include/gtest/gtest-spi.h",
"gtest/googletest/include/gtest/gtest-test-part.h",
"gtest/googletest/include/gtest/gtest-typed-test.h",
"gtest/googletest/include/gtest/gtest.h",
"gtest/googletest/include/gtest/gtest_pred_impl.h",
"gtest/googletest/include/gtest/gtest_prod.h",
"gtest/googletest/include/gtest/internal/custom/gtest-port.h",
"gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
"gtest/googletest/include/gtest/internal/custom/gtest.h",
"gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
"gtest/googletest/include/gtest/internal/gtest-filepath.h",
"gtest/googletest/include/gtest/internal/gtest-internal.h",
"gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
"gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
"gtest/googletest/include/gtest/internal/gtest-param-util.h",
"gtest/googletest/include/gtest/internal/gtest-port-arch.h",
"gtest/googletest/include/gtest/internal/gtest-port.h",
"gtest/googletest/include/gtest/internal/gtest-string.h",
"gtest/googletest/include/gtest/internal/gtest-tuple.h",
"gtest/googletest/include/gtest/internal/gtest-type-util.h",
"gtest/googletest/src/gtest-all.cc",
"gtest/googletest/src/gtest-death-test.cc",
"gtest/googletest/src/gtest-filepath.cc",
"gtest/googletest/src/gtest-internal-inl.h",
"gtest/googletest/src/gtest-port.cc",
"gtest/googletest/src/gtest-printers.cc",
"gtest/googletest/src/gtest-test-part.cc",
"gtest/googletest/src/gtest-typed-test.cc",
"gtest/googletest/src/gtest.cc",
]
sources -= [ "gtest/googletest/src/gtest-all.cc" ]
public_configs = [ ":gtest_public_config" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gtest_private_config" ]
}
static_library("gtest_main") {
# Tests outside of this file should use ../../test:gtest_main instead.
visibility = [ ":*" ]
testonly = true
sources = [
"gtest/googletest/src/gtest_main.cc",
]
deps = [
":gtest",
]
}
test("gtest_all_test") {
sources = [
"gtest/googletest/test/gtest-death-test_test.cc",
"gtest/googletest/test/gtest-filepath_test.cc",
"gtest/googletest/test/gtest-linked_ptr_test.cc",
"gtest/googletest/test/gtest-message_test.cc",
"gtest/googletest/test/gtest-options_test.cc",
"gtest/googletest/test/gtest-port_test.cc",
"gtest/googletest/test/gtest-printers_test.cc",
"gtest/googletest/test/gtest-test-part_test.cc",
"gtest/googletest/test/gtest-typed-test2_test.cc",
"gtest/googletest/test/gtest-typed-test_test.cc",
"gtest/googletest/test/gtest-typed-test_test.h",
"gtest/googletest/test/gtest_main_unittest.cc",
"gtest/googletest/test/gtest_pred_impl_unittest.cc",
"gtest/googletest/test/gtest_prod_test.cc",
"gtest/googletest/test/gtest_unittest.cc",
"gtest/googletest/test/production.cc",
"gtest/googletest/test/production.h",
]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
":gtest_main",
]
if (crashpad_is_win) {
cflags = [ "/wd4702" ] # unreachable code
}
}
test("gtest_environment_test") {
sources = [
"gtest/googletest/test/gtest_environment_test.cc",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
]
}
test("gtest_listener_test") {
sources = [
"gtest/googletest/test/gtest-listener_test.cc",
]
deps = [
":gtest",
]
}
test("gtest_no_test") {
sources = [
"gtest/googletest/test/gtest_no_test_unittest.cc",
]
deps = [
":gtest",
]
}
test("gtest_param_test") {
sources = [
"gtest/googletest/test/gtest-param-test2_test.cc",
"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 += [ ":gtest_private_config" ]
deps = [
":gtest",
]
if (crashpad_is_clang) {
cflags_cc = [
# For gtest/googlemock/test/gmock-matchers_test.ccs
# Unstreamable::value_.
"-Wno-unused-private-field",
]
}
}
test("gtest_premature_exit_test") {
sources = [
"gtest/googletest/test/gtest_premature_exit_test.cc",
]
deps = [
":gtest",
]
}
test("gtest_repeat_test") {
sources = [
"gtest/googletest/test/gtest_repeat_test.cc",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
]
}
test("gtest_sole_header_test") {
sources = [
"gtest/googletest/test/gtest_sole_header_test.cc",
]
deps = [
":gtest",
":gtest_main",
]
}
test("gtest_stress_test") {
sources = [
"gtest/googletest/test/gtest_stress_test.cc",
]
configs += [ ":gtest_private_config" ]
deps = [
":gtest",
]
}
test("gtest_unittest_api_test") {
sources = [
"gtest/googletest/test/gtest-unittest-api_test.cc",
]
deps = [
":gtest",
]
}
group("gtest_all_tests") {
testonly = true
deps = [
":gtest_all_test",
":gtest_environment_test",
":gtest_listener_test",
":gtest_no_test",
":gtest_param_test",
":gtest_premature_exit_test",
":gtest_repeat_test",
":gtest_sole_header_test",
":gtest_stress_test",
":gtest_unittest_api_test",
]
}
config("gmock_private_config") {
visibility = [ ":*" ]
include_dirs = [ "gtest/googlemock" ]
if (crashpad_is_fuchsia) {
libs = [ "launchpad" ]
}
}
config("gmock_public_config") {
include_dirs = [ "gtest/googlemock/include" ]
if (crashpad_is_clang) {
cflags_cc = [
# The MOCK_METHODn() macros do not specify “override”, which triggers
# this warning in users: “error: 'Method' overrides a member function
# but is not marked 'override'
# [-Werror,-Winconsistent-missing-override]”. Suppress these warnings
# until https://github.com/google/googletest/issues/533 is fixed.
"-Wno-inconsistent-missing-override",
]
}
}
static_library("gmock") {
testonly = true
sources = [
"gtest/googlemock/include/gmock/gmock-actions.h",
"gtest/googlemock/include/gmock/gmock-cardinalities.h",
"gtest/googlemock/include/gmock/gmock-generated-actions.h",
"gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
"gtest/googlemock/include/gmock/gmock-generated-matchers.h",
"gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
"gtest/googlemock/include/gmock/gmock-matchers.h",
"gtest/googlemock/include/gmock/gmock-more-actions.h",
"gtest/googlemock/include/gmock/gmock-more-matchers.h",
"gtest/googlemock/include/gmock/gmock-spec-builders.h",
"gtest/googlemock/include/gmock/gmock.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
"gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
"gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
"gtest/googlemock/include/gmock/internal/gmock-port.h",
"gtest/googlemock/src/gmock-all.cc",
"gtest/googlemock/src/gmock-cardinalities.cc",
"gtest/googlemock/src/gmock-internal-utils.cc",
"gtest/googlemock/src/gmock-matchers.cc",
"gtest/googlemock/src/gmock-spec-builders.cc",
"gtest/googlemock/src/gmock.cc",
]
sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_public_config" ]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gmock_private_config" ]
deps = [
":gtest",
]
}
static_library("gmock_main") {
# Tests outside of this file should use ../../test:gmock_main instead.
visibility = [ ":*" ]
testonly = true
sources = [
"gtest/googlemock/src/gmock_main.cc",
]
deps = [
":gmock",
":gtest",
]
}
test("gmock_all_test") {
sources = [
"gtest/googlemock/test/gmock-actions_test.cc",
"gtest/googlemock/test/gmock-cardinalities_test.cc",
"gtest/googlemock/test/gmock-generated-actions_test.cc",
"gtest/googlemock/test/gmock-generated-function-mockers_test.cc",
"gtest/googlemock/test/gmock-generated-internal-utils_test.cc",
"gtest/googlemock/test/gmock-generated-matchers_test.cc",
"gtest/googlemock/test/gmock-internal-utils_test.cc",
"gtest/googlemock/test/gmock-matchers_test.cc",
"gtest/googlemock/test/gmock-more-actions_test.cc",
"gtest/googlemock/test/gmock-nice-strict_test.cc",
"gtest/googlemock/test/gmock-port_test.cc",
"gtest/googlemock/test/gmock-spec-builders_test.cc",
"gtest/googlemock/test/gmock_test.cc",
]
configs += [
":gmock_private_config",
":gtest_private_config",
]
deps = [
":gmock",
":gmock_main",
":gtest",
]
if (crashpad_is_clang) {
cflags_cc = [
# For gtest/googlemock/test/gmock-matchers_test.ccs
# testing::gmock_matchers_test::Unprintable::c_.
"-Wno-unused-private-field",
]
}
}
test("gmock_link_test") {
sources = [
"gtest/googlemock/test/gmock_link2_test.cc",
"gtest/googlemock/test/gmock_link_test.cc",
"gtest/googlemock/test/gmock_link_test.h",
]
configs += [ ":gmock_private_config" ]
deps = [
":gmock",
":gmock_main",
":gtest",
]
}
test("gmock_stress_test") {
sources = [
"gtest/googlemock/test/gmock_stress_test.cc",
]
configs -= [
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
configs += [ ":gmock_private_config" ]
deps = [
":gmock",
":gtest",
]
}
group("gmock_all_tests") {
testonly = true
deps = [
":gmock_all_test",
":gmock_link_test",
":gmock_stress_test",
]
}
}