v8/third_party/googletest/BUILD.gn

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

174 lines
6.0 KiB
Plaintext
Raw Normal View History

# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../../gni/v8.gni")
config("gtest_config") {
visibility = [ ":*" ] # gmock also shares this config.
defines = [
# Chromium always links googletest statically, so no API qualifier is
# necessary. The definition in gtest-port.h at the time of this writing
# causes crashes in content_browsertests.
"GTEST_API_=",
# In order to allow regex matches in gtest to be shared between Windows
# and other systems, we tell gtest to always use its internal engine.
"GTEST_HAS_POSIX_RE=0",
# Enables C++11 features.
"GTEST_LANG_CXX11=1",
# Prevents gtest from including both <tr1/tuple> and <tuple>.
"GTEST_HAS_TR1_TUPLE=0",
]
# Gtest headers need to be able to find themselves.
include_dirs = [
# TODO(crbug.com/829773): Remove this after transitioning off <tr1/tuple>.
"custom",
"src/googletest/include",
]
if (is_win) {
cflags = [ "/wd4800" ] # Unused variable warning.
}
}
config("gmock_config") {
# Gmock headers need to be able to find themselves.
include_dirs = [
# TODO(crbug.com/829773): Add "custom" here after transitioning off
# <tr1/tuple>.
"src/googlemock/include",
]
}
# Do NOT depend on this directly. Use //testing/gtest instead.
# See README.chromium for details.
source_set("gtest") {
testonly = true
sources = [
Update V8 DEPS. Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/841e388..1c8bf90 Rolling v8/buildtools/linux64: git_revision:80a40b07305373617eba2d5878d353532af77da3..git_revision:0725d7827575b239594fbc8fd5192873a1d62f44 Rolling v8/buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi/+log/7d79126..e4cc353 Rolling v8/buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind/+log/efb2cbd..c8a5d43 Rolling v8/third_party/android_platform: https://chromium.googlesource.com/chromium/src/third_party/android_platform/+log/5023a5c..f0d4a3b Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8bc3659..d90eeee Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/a657331..d05a2e0 Rolling v8/third_party/googletest/src: https://chromium.googlesource.com/external/github.com/google/googletest/+log/100f6fb..f45d586 Rolling v8/tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang/+log/df50898..5518918 Rolling v8/tools/luci-go: git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192..git_revision:09f8b3edbbf18dc63d0d5aa7722ae7acc20b11b4 Rolling v8/tools/luci-go: git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192..git_revision:09f8b3edbbf18dc63d0d5aa7722ae7acc20b11b4 R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com Change-Id: Ia9d43ad1b668bfa8e7172d2265d10204a43d895d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3412230 Owners-Override: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#78773}
2022-01-26 10:54:52 +00:00
"src/googletest/include/gtest/gtest-assertion-result.h",
"src/googletest/include/gtest/gtest-death-test.h",
"src/googletest/include/gtest/gtest-matchers.h",
"src/googletest/include/gtest/gtest-message.h",
"src/googletest/include/gtest/gtest-param-test.h",
"src/googletest/include/gtest/gtest-printers.h",
"src/googletest/include/gtest/gtest-spi.h",
"src/googletest/include/gtest/gtest-test-part.h",
"src/googletest/include/gtest/gtest-typed-test.h",
"src/googletest/include/gtest/gtest.h",
"src/googletest/include/gtest/gtest_pred_impl.h",
"src/googletest/include/gtest/internal/gtest-death-test-internal.h",
"src/googletest/include/gtest/internal/gtest-filepath.h",
"src/googletest/include/gtest/internal/gtest-internal.h",
"src/googletest/include/gtest/internal/gtest-param-util.h",
"src/googletest/include/gtest/internal/gtest-port.h",
"src/googletest/include/gtest/internal/gtest-string.h",
"src/googletest/include/gtest/internal/gtest-type-util.h",
#"src/googletest/src/gtest-all.cc", # Not needed by our build.
Update V8 DEPS. Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/841e388..1c8bf90 Rolling v8/buildtools/linux64: git_revision:80a40b07305373617eba2d5878d353532af77da3..git_revision:0725d7827575b239594fbc8fd5192873a1d62f44 Rolling v8/buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi/+log/7d79126..e4cc353 Rolling v8/buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind/+log/efb2cbd..c8a5d43 Rolling v8/third_party/android_platform: https://chromium.googlesource.com/chromium/src/third_party/android_platform/+log/5023a5c..f0d4a3b Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/8bc3659..d90eeee Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/a657331..d05a2e0 Rolling v8/third_party/googletest/src: https://chromium.googlesource.com/external/github.com/google/googletest/+log/100f6fb..f45d586 Rolling v8/tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang/+log/df50898..5518918 Rolling v8/tools/luci-go: git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192..git_revision:09f8b3edbbf18dc63d0d5aa7722ae7acc20b11b4 Rolling v8/tools/luci-go: git_revision:5b02a4aaeb5fd78d6fe41d6d54d1cb58da17f192..git_revision:09f8b3edbbf18dc63d0d5aa7722ae7acc20b11b4 R=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com Change-Id: Ia9d43ad1b668bfa8e7172d2265d10204a43d895d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3412230 Owners-Override: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#78773}
2022-01-26 10:54:52 +00:00
"src/googletest/src/gtest-assertion-result.cc",
"src/googletest/src/gtest-death-test.cc",
"src/googletest/src/gtest-filepath.cc",
"src/googletest/src/gtest-internal-inl.h",
"src/googletest/src/gtest-matchers.cc",
"src/googletest/src/gtest-port.cc",
"src/googletest/src/gtest-printers.cc",
"src/googletest/src/gtest-test-part.cc",
"src/googletest/src/gtest-typed-test.cc",
"src/googletest/src/gtest.cc",
]
# Some files include "src/gtest-internal-inl.h".
include_dirs = [ "src/googletest" ]
all_dependent_configs = [ ":gtest_config" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
# V8-only workaround for http://crbug.com/chromium/1191946. Ensures that
# googletest is compiled with the same visibility such as the rest of V8, see
# https://source.chromium.org/chromium/chromium/src/+/master:v8/gni/v8.gni
if ((is_posix || is_fuchsia) &&
(v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}
deps = []
if (is_fuchsia) {
deps += [
"//third_party/fuchsia-sdk/sdk/pkg/fdio",
"//third_party/fuchsia-sdk/sdk/pkg/zx",
]
}
}
# Do NOT depend on this directly. Use //testing/gtest:gtest_main instead.
# See README.chromium for details.
source_set("gtest_main") {
testonly = true
Roll v8/third_party/googletest/src/ 10b1902d8..e3f0319d8 (43 commits) https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/10b1902d893e..e3f0319d89f4 This CL also removes references to gmock-generated-matchers.h, which was removed from googletest in commit 41b5f149ab306e96b5b2faf523505d75acffd98a, and to gmock-generated-function-mockers.h, which was removed from googletest in commit fbf67a70d07543f40832d0cd7a58f304bc6ab1d1. $ git log 10b1902d8..e3f0319d8 --date=short --no-merges --format='%ad %ae %s' 2020-04-01 absl-team Googletest export 2020-03-30 absl-team Googletest export 2020-03-23 absl-team Googletest export 2020-03-24 krystian.kuzniarek remove chapters on Autotools, Meson and plain Makefiles 2020-03-24 krystian.kuzniarek remove dead code in googletest-output-test 2020-03-24 pkryger Swap settimer and sigaction calls to avoid SIGPROF 2020-03-20 absl-team Googletest export 2019-07-11 adam.f.badura Add support for std::function in MockFunction (#2277) 2019-12-26 adam.f.badura Add tests for MockFunction deduction (#2277) 2020-03-17 absl-team Googletest export 2020-03-16 dmauro Googletest export 2020-03-13 absl-team Googletest export 2020-03-06 absl-team Googletest export 2020-03-03 absl-team Googletest export 2020-03-03 absl-team Googletest export 2020-03-11 romain.geissler Make sure IsATTY does not clobber errno. 2020-02-27 absl-team Googletest export 2020-02-25 absl-team Googletest export 2020-02-19 absl-team Googletest export 2020-02-21 johan.mabille Fixed warnings 2020-02-12 absl-team Googletest export 2020-02-11 absl-team Googletest export 2020-02-11 absl-team Googletest export 2020-02-10 absl-team Googletest export 2020-02-10 absl-team Googletest export 2020-02-07 absl-team Googletest export 2020-02-07 absl-team Googletest export 2020-02-06 durandal Googletest export 2020-02-05 absl-team Googletest export 2020-02-05 absl-team Googletest export 2020-02-03 absl-team Googletest export 2020-02-03 absl-team Googletest export 2020-01-31 absl-team Googletest export 2020-01-31 absl-team Googletest export 2020-01-29 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-24 absl-team Googletest export 2020-01-24 absl-team Googletest export 2020-01-23 absl-team Googletest export 2020-01-29 krystian.kuzniarek remove a dead reference to the Autotools script 2019-11-11 krystian.kuzniarek add documentation for the premature-exit-file protocol Created with: roll-dep v8/third_party/googletest/src Bug: chromium:1070043 Change-Id: If63ebef3355a8e9da53cfa131c50ba03a0ea650d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150068 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#67138}
2020-04-15 01:35:11 +00:00
sources = [ "src/googletest/src/gtest_main.cc" ]
deps = [ ":gtest" ]
}
# Do NOT depend on this directly. Use //testing/gmock:gmock_main instead.
# See README.chromium for details.
source_set("gmock") {
testonly = true
sources = [
"src/googlemock/include/gmock/gmock-actions.h",
"src/googlemock/include/gmock/gmock-cardinalities.h",
"src/googlemock/include/gmock/gmock-function-mocker.h",
"src/googlemock/include/gmock/gmock-matchers.h",
"src/googlemock/include/gmock/gmock-more-actions.h",
"src/googlemock/include/gmock/gmock-more-matchers.h",
"src/googlemock/include/gmock/gmock-nice-strict.h",
"src/googlemock/include/gmock/gmock-spec-builders.h",
"src/googlemock/include/gmock/gmock.h",
"src/googlemock/include/gmock/internal/gmock-internal-utils.h",
"src/googlemock/include/gmock/internal/gmock-port.h",
"src/googlemock/include/gmock/internal/gmock-pp.h",
#"src/googlemock/src/gmock-all.cc", # Not needed by our build.
"src/googlemock/src/gmock-cardinalities.cc",
"src/googlemock/src/gmock-internal-utils.cc",
"src/googlemock/src/gmock-matchers.cc",
"src/googlemock/src/gmock-spec-builders.cc",
"src/googlemock/src/gmock.cc",
]
# V8-only workaround for http://crbug.com/chromium/1191946. Ensures that
# googletest is compiled with the same visibility such as the rest of V8, see
# https://source.chromium.org/chromium/chromium/src/+/master:v8/gni/v8.gni
if ((is_posix || is_fuchsia) &&
(v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}
public_configs = [
":gmock_config",
":gtest_config",
]
deps = [ ":gtest" ]
}
# Do NOT depend on this directly. Use //testing/gmock:gmock_main instead.
# See README.chromium for details.
static_library("gmock_main") {
testonly = true
Roll v8/third_party/googletest/src/ 10b1902d8..e3f0319d8 (43 commits) https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/10b1902d893e..e3f0319d89f4 This CL also removes references to gmock-generated-matchers.h, which was removed from googletest in commit 41b5f149ab306e96b5b2faf523505d75acffd98a, and to gmock-generated-function-mockers.h, which was removed from googletest in commit fbf67a70d07543f40832d0cd7a58f304bc6ab1d1. $ git log 10b1902d8..e3f0319d8 --date=short --no-merges --format='%ad %ae %s' 2020-04-01 absl-team Googletest export 2020-03-30 absl-team Googletest export 2020-03-23 absl-team Googletest export 2020-03-24 krystian.kuzniarek remove chapters on Autotools, Meson and plain Makefiles 2020-03-24 krystian.kuzniarek remove dead code in googletest-output-test 2020-03-24 pkryger Swap settimer and sigaction calls to avoid SIGPROF 2020-03-20 absl-team Googletest export 2019-07-11 adam.f.badura Add support for std::function in MockFunction (#2277) 2019-12-26 adam.f.badura Add tests for MockFunction deduction (#2277) 2020-03-17 absl-team Googletest export 2020-03-16 dmauro Googletest export 2020-03-13 absl-team Googletest export 2020-03-06 absl-team Googletest export 2020-03-03 absl-team Googletest export 2020-03-03 absl-team Googletest export 2020-03-11 romain.geissler Make sure IsATTY does not clobber errno. 2020-02-27 absl-team Googletest export 2020-02-25 absl-team Googletest export 2020-02-19 absl-team Googletest export 2020-02-21 johan.mabille Fixed warnings 2020-02-12 absl-team Googletest export 2020-02-11 absl-team Googletest export 2020-02-11 absl-team Googletest export 2020-02-10 absl-team Googletest export 2020-02-10 absl-team Googletest export 2020-02-07 absl-team Googletest export 2020-02-07 absl-team Googletest export 2020-02-06 durandal Googletest export 2020-02-05 absl-team Googletest export 2020-02-05 absl-team Googletest export 2020-02-03 absl-team Googletest export 2020-02-03 absl-team Googletest export 2020-01-31 absl-team Googletest export 2020-01-31 absl-team Googletest export 2020-01-29 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-27 absl-team Googletest export 2020-01-24 absl-team Googletest export 2020-01-24 absl-team Googletest export 2020-01-23 absl-team Googletest export 2020-01-29 krystian.kuzniarek remove a dead reference to the Autotools script 2019-11-11 krystian.kuzniarek add documentation for the premature-exit-file protocol Created with: roll-dep v8/third_party/googletest/src Bug: chromium:1070043 Change-Id: If63ebef3355a8e9da53cfa131c50ba03a0ea650d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150068 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#67138}
2020-04-15 01:35:11 +00:00
sources = [ "src/googlemock/src/gmock_main.cc" ]
deps = [
":gmock",
":gtest",
]
}