Justin Cohen b8d3be9b78 Roll crashpad/third_party/googletest/googletest/ e589a3371..11da093e0 (288 commits)
e589a33717..11da093e04

$ git log e589a3371..11da093e0 --date=short --no-merges --format='%ad %ae %s'
2021-04-20 github Use URL instead of git-repo
2021-04-15 sebkraemer Apply missing suggestions from code review for GTEST_SKIP
2021-04-15 sebkraemer Apply suggestions from code review for GTEST_SKIP documentation
2020-12-15 sebkraemer Add subsection for GTEST_SKIP documentation
2021-04-15 jbampton chore: fix spelling
2021-04-14 github Mention to explicitely set the option to it's default.
2021-04-14 github Changes like Requested.
2021-03-17 77407429+a-sully Update nicestrictnaggy gmock cook_book links
2021-03-11 absl-team Internal change
2021-03-14 zekewarren Use @platforms instead of @bazel_tools for windows constraint
2021-03-13 github Use Fetchcontent instead of ExternalProject
2018-05-01 lantw44 Avoid using environ on FreeBSD
2020-02-17 krystian.kuzniarek remove a duplicated include
2020-06-10 rharrison Fix build issue for MinGW
2020-05-30 eli fix compilation on OpenBSD 6.7
2020-03-07 krystian.kuzniarek make UniversalPrinter<std::any> support RTTI
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::any (without support for RTTI)
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::optional
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::variant
2020-05-25 invalid_ms_user Use count function instead of handwritten loop
2020-05-10 mate.pek README.dm: Renamed related open source project name: Catch2 and Google Test Explorer -> C++ TestMate
2020-05-08 martin Remove an explicit include of debugapi.h
2020-05-05 igor.n.nazarenko Detect proto messages based on presense of DebugString.
2020-03-26 mvoorsluys Fix test with stack.
2020-03-29 verdoialaurent Fix --gtest_print_time coloring
2020-03-26 mvoorsluys Fixed xml unit-tests and added extra tests
2020-03-26 mvoorsluys Fix multiple \n characters in xml file when using GTEST_SKIP.
2020-03-26 mvoorsluys Only write ">\n" once when there is failure and skipped tests.
2020-03-26 mvoorsluys Output skipped information in the xml file.
2020-03-21 ngompa13 Set the version for the libraries
2020-02-21 nini16041988-gitbucket Add missing call for gtest_list_output_unittest_ unitTest. Add unitTest for fixed TEST_P line number. Use CodeLocation TestInfo struct.
2020-02-18 nini16041988-gitbucket Fix: shadow member
2020-02-18 nini16041988-gitbucket Add correct line number to TEST_P test cases for gtest_output.
2020-02-06 59134746+aribibek fix a link to documentation
2020-01-17 hgsilverman Fix always false condition and clean function body
2020-01-22 mjvk Fixes extensions missing for QNX

Created with:
  roll-dep crashpad/third_party/googletest/googletest

Change-Id: Ie3358be72e398be40fd32efe03d2011832e88309
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2854039
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-04-29 18:37:27 +00:00

380 lines
14 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("googletest") {
testonly = true
public_deps = [ "//testing/gtest" ]
}
group("googlemock") {
testonly = true
public_deps = [ "//testing/gmock" ]
}
} else if (crashpad_is_in_dart || crashpad_is_in_fuchsia) {
group("googletest") {
testonly = true
public_deps = [ "//third_party/googletest:gtest" ]
}
group("googlemock") {
testonly = true
public_deps = [ "//third_party/googletest:gmock" ]
}
} else if (crashpad_is_standalone || crashpad_is_external) {
if (crashpad_is_standalone) {
googletest_dir = "googletest"
mini_chromium_dir = "//third_party/mini_chromium/mini_chromium"
} else if (crashpad_is_external) {
googletest_dir = "../../../../googletest"
mini_chromium_dir = "//../../mini_chromium/mini_chromium"
}
config("googletest_private_config") {
visibility = [ ":*" ]
include_dirs = [ "$googletest_dir/googletest" ]
defines = [ "GUNIT_NO_GOOGLE3=1" ]
}
config("googletest_public_config") {
include_dirs = [ "$googletest_dir/googletest/include" ]
}
static_library("googletest") {
testonly = true
sources = [
"$googletest_dir/googletest/include/gtest/gtest-death-test.h",
"$googletest_dir/googletest/include/gtest/gtest-matchers.h",
"$googletest_dir/googletest/include/gtest/gtest-message.h",
"$googletest_dir/googletest/include/gtest/gtest-param-test.h",
"$googletest_dir/googletest/include/gtest/gtest-printers.h",
"$googletest_dir/googletest/include/gtest/gtest-spi.h",
"$googletest_dir/googletest/include/gtest/gtest-test-part.h",
"$googletest_dir/googletest/include/gtest/gtest-typed-test.h",
"$googletest_dir/googletest/include/gtest/gtest.h",
"$googletest_dir/googletest/include/gtest/gtest_pred_impl.h",
"$googletest_dir/googletest/include/gtest/gtest_prod.h",
"$googletest_dir/googletest/include/gtest/internal/custom/gtest-port.h",
"$googletest_dir/googletest/include/gtest/internal/custom/gtest-printers.h",
"$googletest_dir/googletest/include/gtest/internal/custom/gtest.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-death-test-internal.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-filepath.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-internal.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-param-util.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-port-arch.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-port.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-string.h",
"$googletest_dir/googletest/include/gtest/internal/gtest-type-util.h",
"$googletest_dir/googletest/src/gtest-all.cc",
"$googletest_dir/googletest/src/gtest-death-test.cc",
"$googletest_dir/googletest/src/gtest-filepath.cc",
"$googletest_dir/googletest/src/gtest-internal-inl.h",
"$googletest_dir/googletest/src/gtest-matchers.cc",
"$googletest_dir/googletest/src/gtest-port.cc",
"$googletest_dir/googletest/src/gtest-printers.cc",
"$googletest_dir/googletest/src/gtest-test-part.cc",
"$googletest_dir/googletest/src/gtest-typed-test.cc",
"$googletest_dir/googletest/src/gtest.cc",
]
sources -= [ "$googletest_dir/googletest/src/gtest-all.cc" ]
public_configs = [ ":googletest_public_config" ]
configs -= [ "$mini_chromium_dir/build/config:Wexit_time_destructors" ]
configs += [ ":googletest_private_config" ]
if (crashpad_is_fuchsia) {
deps = [ "../fuchsia" ]
}
}
static_library("googletest_main") {
# Tests outside of this file should use ../../test:googletest_main instead.
visibility = [ ":*" ]
testonly = true
sources = [ "$googletest_dir/googletest/src/gtest_main.cc" ]
deps = [ ":googletest" ]
}
test("gtest_all_test") {
sources = [
"$googletest_dir/googletest/test/googletest-death-test-test.cc",
"$googletest_dir/googletest/test/googletest-filepath-test.cc",
"$googletest_dir/googletest/test/googletest-message-test.cc",
"$googletest_dir/googletest/test/googletest-options-test.cc",
"$googletest_dir/googletest/test/googletest-port-test.cc",
"$googletest_dir/googletest/test/googletest-test-part-test.cc",
"$googletest_dir/googletest/test/gtest-typed-test2_test.cc",
"$googletest_dir/googletest/test/gtest-typed-test_test.cc",
"$googletest_dir/googletest/test/gtest-typed-test_test.h",
"$googletest_dir/googletest/test/gtest_main_unittest.cc",
"$googletest_dir/googletest/test/gtest_pred_impl_unittest.cc",
"$googletest_dir/googletest/test/gtest_prod_test.cc",
"$googletest_dir/googletest/test/gtest_skip_test.cc",
"$googletest_dir/googletest/test/gtest_unittest.cc",
"$googletest_dir/googletest/test/production.cc",
"$googletest_dir/googletest/test/production.h",
]
if (!crashpad_is_win) {
# TODO: Fix error C2015: too many characters in constant. As this error
# cannot be suppressed, removing the test on Windows. See
# https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2855854/2
# for details.
sources +=
[ "$googletest_dir/googletest/test/googletest-printers-test.cc" ]
}
configs -= [ "$mini_chromium_dir/build/config:Wexit_time_destructors" ]
configs += [ ":googletest_private_config" ]
deps = [
":googletest",
":googletest_main",
]
if (crashpad_is_win) {
cflags = [ "/wd4702" ] # unreachable code
}
}
test("gtest_environment_test") {
sources = [ "$googletest_dir/googletest/test/gtest_environment_test.cc" ]
configs += [ ":googletest_private_config" ]
deps = [ ":googletest" ]
}
test("gtest_listener_test") {
sources = [ "$googletest_dir/googletest/test/googletest-listener-test.cc" ]
deps = [ ":googletest" ]
}
test("gtest_macro_stack_footprint_test") {
sources = [ "$googletest_dir/googletest/test/gtest_test_macro_stack_footprint_test.cc" ]
deps = [ ":googletest" ]
}
test("gtest_no_test") {
sources = [ "$googletest_dir/googletest/test/gtest_no_test_unittest.cc" ]
deps = [ ":googletest" ]
}
test("gtest_param_test") {
sources = [
"$googletest_dir/googletest/test/googletest-param-test-test.cc",
"$googletest_dir/googletest/test/googletest-param-test-test.h",
"$googletest_dir/googletest/test/googletest-param-test2-test.cc",
]
configs -= [ "$mini_chromium_dir/build/config:Wexit_time_destructors" ]
configs += [ ":googletest_private_config" ]
deps = [ ":googletest" ]
if (crashpad_is_clang) {
cflags_cc = [
# For googletest/googlemock/test/gmock-matchers_test.ccs
# Unstreamable::value_.
"-Wno-unused-private-field",
]
}
}
test("gtest_premature_exit_test") {
sources = [ "$googletest_dir/googletest/test/gtest_premature_exit_test.cc" ]
deps = [ ":googletest" ]
}
test("gtest_repeat_test") {
sources = [ "$googletest_dir/googletest/test/gtest_repeat_test.cc" ]
configs += [ ":googletest_private_config" ]
deps = [ ":googletest" ]
}
test("gtest_skip_in_environment_setup_test") {
sources = [
"$googletest_dir/googletest/test/gtest_skip_in_environment_setup_test.cc",
]
deps = [ ":googletest" ]
}
test("gtest_sole_header_test") {
sources = [ "$googletest_dir/googletest/test/gtest_sole_header_test.cc" ]
deps = [
":googletest",
":googletest_main",
]
}
test("gtest_stress_test") {
sources = [ "$googletest_dir/googletest/test/gtest_stress_test.cc" ]
configs += [ ":googletest_private_config" ]
deps = [ ":googletest" ]
}
test("gtest_unittest_api_test") {
sources = [ "$googletest_dir/googletest/test/gtest-unittest-api_test.cc" ]
deps = [ ":googletest" ]
}
group("googletest_all_tests") {
testonly = true
deps = [
":gtest_all_test",
":gtest_environment_test",
":gtest_listener_test",
":gtest_macro_stack_footprint_test",
":gtest_no_test",
":gtest_param_test",
":gtest_premature_exit_test",
":gtest_repeat_test",
":gtest_skip_in_environment_setup_test",
":gtest_sole_header_test",
":gtest_stress_test",
":gtest_unittest_api_test",
]
}
config("googlemock_private_config") {
visibility = [ ":*" ]
include_dirs = [ "$googletest_dir/googlemock" ]
}
config("googlemock_public_config") {
include_dirs = [ "$googletest_dir/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("googlemock") {
testonly = true
sources = [
"$googletest_dir/googlemock/include/gmock/gmock-actions.h",
"$googletest_dir/googlemock/include/gmock/gmock-cardinalities.h",
"$googletest_dir/googlemock/include/gmock/gmock-function-mocker.h",
"$googletest_dir/googlemock/include/gmock/gmock-matchers.h",
"$googletest_dir/googlemock/include/gmock/gmock-more-actions.h",
"$googletest_dir/googlemock/include/gmock/gmock-more-matchers.h",
"$googletest_dir/googlemock/include/gmock/gmock-nice-strict.h",
"$googletest_dir/googlemock/include/gmock/gmock-spec-builders.h",
"$googletest_dir/googlemock/include/gmock/gmock.h",
"$googletest_dir/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
"$googletest_dir/googlemock/include/gmock/internal/custom/gmock-matchers.h",
"$googletest_dir/googlemock/include/gmock/internal/custom/gmock-port.h",
"$googletest_dir/googlemock/include/gmock/internal/gmock-internal-utils.h",
"$googletest_dir/googlemock/include/gmock/internal/gmock-port.h",
"$googletest_dir/googlemock/include/gmock/internal/gmock-pp.h",
"$googletest_dir/googlemock/src/gmock-all.cc",
"$googletest_dir/googlemock/src/gmock-cardinalities.cc",
"$googletest_dir/googlemock/src/gmock-internal-utils.cc",
"$googletest_dir/googlemock/src/gmock-matchers.cc",
"$googletest_dir/googlemock/src/gmock-spec-builders.cc",
"$googletest_dir/googlemock/src/gmock.cc",
]
sources -= [ "$googletest_dir/googlemock/src/gmock-all.cc" ]
public_configs = [ ":googlemock_public_config" ]
configs -= [ "$mini_chromium_dir/build/config:Wexit_time_destructors" ]
configs += [ ":googlemock_private_config" ]
deps = [ ":googletest" ]
}
static_library("googlemock_main") {
# Tests outside of this file should use ../../test:googlemock_main instead.
visibility = [ ":*" ]
testonly = true
sources = [ "$googletest_dir/googlemock/src/gmock_main.cc" ]
deps = [
":googlemock",
":googletest",
]
}
test("gmock_all_test") {
sources = [
"$googletest_dir/googlemock/test/gmock-actions_test.cc",
"$googletest_dir/googlemock/test/gmock-cardinalities_test.cc",
"$googletest_dir/googlemock/test/gmock-function-mocker_test.cc",
"$googletest_dir/googlemock/test/gmock-internal-utils_test.cc",
"$googletest_dir/googlemock/test/gmock-matchers_test.cc",
"$googletest_dir/googlemock/test/gmock-more-actions_test.cc",
"$googletest_dir/googlemock/test/gmock-nice-strict_test.cc",
"$googletest_dir/googlemock/test/gmock-port_test.cc",
"$googletest_dir/googlemock/test/gmock-pp-string_test.cc",
"$googletest_dir/googlemock/test/gmock-pp_test.cc",
"$googletest_dir/googlemock/test/gmock-spec-builders_test.cc",
"$googletest_dir/googlemock/test/gmock_test.cc",
]
configs += [
":googlemock_private_config",
":googletest_private_config",
]
deps = [
":googlemock",
":googlemock_main",
":googletest",
]
if (crashpad_is_clang) {
cflags_cc = [
# For googletest/googlemock/test/gmock-matchers_test.ccs
# testing::googlemock_matchers_test::Unprintable::c_.
"-Wno-unused-private-field",
]
}
if (crashpad_is_win) {
# TODO: Correct SDK in vc\tools\msvc\14.14.26428\include\functional
cflags = [ "/wd4789" ] # VAR of size N bytes will be overrun
}
}
test("gmock_link_test") {
sources = [
"$googletest_dir/googlemock/test/gmock_link2_test.cc",
"$googletest_dir/googlemock/test/gmock_link_test.cc",
"$googletest_dir/googlemock/test/gmock_link_test.h",
]
configs += [ ":googlemock_private_config" ]
deps = [
":googlemock",
":googlemock_main",
":googletest",
]
}
test("gmock_stress_test") {
sources = [ "$googletest_dir/googlemock/test/gmock_stress_test.cc" ]
configs -= [ "$mini_chromium_dir/build/config:Wexit_time_destructors" ]
configs += [ ":googlemock_private_config" ]
deps = [
":googlemock",
":googletest",
]
}
group("googlemock_all_tests") {
testonly = true
deps = [
":gmock_all_test",
":gmock_link_test",
":gmock_stress_test",
]
}
}