The new build environment (Sequoia) does not have CMake
pre-installed, so install it, and set the variables necessary
for parallel builds.
PiperOrigin-RevId: 865468933
Change-Id: I0316281d0065bc52b653258556a6928faacb7c0e
On windows flags declaration must be prepend by `GTEST_API_`
to have the correct declspec (dllexport or dllimport)
This patch also fix super build integration of googletest by adding the necessary `INSTALL_RPATH` and `$<BUILD_INTERFACE:` needed to be able to `FetchContent` or `add_subdirectory()` googletest in a user CMake project.
Fix#4718
related to abseil/abseil-cpp#1817
PiperOrigin-RevId: 854187933
Change-Id: I4341fdb7e88a51c5f9a1c72c58bcc8c4d6bfd1c5
Making this change requires an update to the CI scripts to ignore
warnings coming from external repositories so we don't error on
deprecation warnings (RE2 has warnings about deprecated Mutex methods)
PiperOrigin-RevId: 853824282
Change-Id: Ic79663943d3b7c8cfa95e9a73b49a7ad761e1eae
The [Premature Exit File](https://google.github.io/googletest/advanced.html#detecting-test-premature-exit)
can be used for more than just death tests. Runners can use it to detect any
kind of unexpected exit.
Presently, its creation is tied to whether a platform supports Death
Tests. This change removes that coupling (though if Death Tests are supported,
then the Premature Exit file is implicitly supported).
PiperOrigin-RevId: 853416224
Change-Id: I5354730b82bc8a20981120f4e1df59b58cb31f6e
Between the friend declaration, visibility declaration, and
attribute placement rules, compilers can't seem to agree on the
how to write this, so I switched to a static factory function.
Fixes https://github.com/google/googletest/issues/4881
PiperOrigin-RevId: 852842303
Change-Id: I7fe737819abf05ea2911693f8d93683446e326cc
`EXPECT_THAT(foo, Matcher(bar))` can sometimes get accidentally written as a
no-op `foo, Matcher(bar)`, causing the code to be exercised but defeating the
purpose of testing.
PiperOrigin-RevId: 841880995
Change-Id: Ia55548e3dd83a6f44fff7b5433c8c8ecd7ecbe03
Sharded tests interact awkwardly with --gtest_fail_if_no_test_selected, but we
can't speak clearly enough to the use cases to complicate the mental model, so
instead we attempt to clarify the simplest approach to debugging a single test
when sharding and --gtest_fail_if_no_test_selected are both in use: unset the
flag.
PiperOrigin-RevId: 829686145
Change-Id: I9ebbddc6e7537feefe2a3707fd323fc9132b99d1
Sharded tests interact awkwardly with --gtest_fail_if_no_test_selected, but we
can't speak clearly enough to the use cases to complicate the mental model, so
instead we attempt to clarify the simplest approach to debugging a single test
when sharding and --gtest_fail_if_no_test_selected are both in use: unset the
flag.
PiperOrigin-RevId: 829609266
Change-Id: I090d5bfac979171532249e9312feef8d9aad5f16
For `EXPECT_THAT` matcher usage, showing only the first failure meant
that users would sometimes have to make a fix and run the test again
only to notice that there's another failure. It's better to show more
failures so that the user can fix several issues in one go.
In practice, very little code actually wants the short circuiting here,
only a handful of cases with custom matchers used like
`AllOf(BoundsCheck(), UncheckedAccess())`. These cases are fixable by
refactoring `UncheckedAccess()` to instead also apply a bounds check to
fail the matcher rather than crash. Notably, this change doesn't affect
`AnyOf`, so another workaround is to change `AllOf(m1, m2, ...)` into
`Not(AnyOf(Not(m1), Not(m2), ...))`.
PiperOrigin-RevId: 826316273
Change-Id: Ie8186f75c10443d8da35b5d07b6a8cd9ae85b451
where it does not work when it is in ${TMP} and also fix the quoting
which was causing it to incorrectly receive the argument
https://github.com/bazelbuild/bazel/issues/27156
PiperOrigin-RevId: 826083231
Change-Id: If8f069c42c62434893db27bdaae0b0e25b67839d
This allows for simpler migration of function args to smart pointers without needing all changes to tests to be atomic.
PiperOrigin-RevId: 818635600
Change-Id: I9434685d9640f82b98d0b5261701b78c93d3ec1e
This also adds the dependencies of rules_cc to WORKSPACE.
bzlmod automatically pulls in dependencies.
skylib is removed as it is pulled in by a deps function.
PiperOrigin-RevId: 808659470
Change-Id: Idc41cad7b05019793d4a1898bdb80bc4797da5cf
Replace an internal link to AbslStringify's documentation with the equivalent public link.
PiperOrigin-RevId: 779085254
Change-Id: I2cbd2b6262a5ced06f166d4fcc7c08796e5a60af
Users have shown some confusion about the interaction between this flag,
sharding, and --gtest_filter, so let's provide some more information.
PiperOrigin-RevId: 776734799
Change-Id: Icdcf6aa056988095f15588758994604d326c0567