-
Notifications
You must be signed in to change notification settings - Fork 4.9k
googletest: upgrade to a newer version #33219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,11 @@ bool isDeathTestChild(int argc, char** argv) { | |
|
||
int TestRunner::runTests(int argc, char** argv) { | ||
const bool is_death_test_child = isDeathTestChild(argc, argv); | ||
|
||
// Use the recommended, but not default, "threadsafe" style for the Death Tests. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this comment (ie the original) is not entirely accurate the threadsafe mode is not default (or recommended) as it makes testing much slower - not sure if we can do anything about that, so perhaps this is a pedantic point - but if there was a way not to do this it would be better |
||
// See: https://github.com/google/googletest/commit/84ec2e0365d791e4ebc7ec249f09078fb5ab6caa | ||
GTEST_FLAG_SET(death_test_style, "threadsafe"); | ||
|
||
::testing::InitGoogleMock(&argc, argv); | ||
// We hold on to process_wide to provide RAII cleanup of process-wide | ||
// state. | ||
|
@@ -88,10 +93,6 @@ int TestRunner::runTests(int argc, char** argv) { | |
::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); | ||
listeners.Append(new TestListener); | ||
|
||
// Use the recommended, but not default, "threadsafe" style for the Death Tests. | ||
// See: https://github.com/google/googletest/commit/84ec2e0365d791e4ebc7ec249f09078fb5ab6caa | ||
::testing::FLAGS_gtest_death_test_style = "threadsafe"; | ||
|
||
// Set gtest properties | ||
// (https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#logging-additional-information), | ||
// they are available in the test XML. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pin to a release version please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.14.0
is the latest - https://github.com/google/googletest/releases/tag/v1.14.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can pin to a release version, but unfortunately not the latest (requires new absl and protobuf versions).