envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Update googletest to 1.15.2

Open asedeno opened this issue 4 months ago • 5 comments

This picks up nearly four years of changes in googletest.

googletest has updated to abseil flags^1.

The most notable difference is that unrecognized flags result in a flag parsing error, and are not returned to the user though a modified argc/argv, unless they appear after the positional argument delimiter ("--").

For example, to pass a non-Abseil flag, you would have to do ./mytest --gtest_color=false -- --myflag=myvalue

After this upgrade, to set Envoy's CLI arguments in tests requires passing them after --. For example,

bazel test //test/common/common:logger_test --test_arg="--" --test_arg="-l trace"

Per googletest documentation^2, it is strongly recommended that death tests have names ending in DeathTest rather than simply Test.

Some death tests behave better when run in a threadsafe manner^3. This is a trade-off that costs speed. The flag has been set in tests where it made a difference.

When building with bazel and abseil, googletest uses re2^4. The switch to re2 means that . does not match newline by default. This prefixes regex that need it with (?s) to change that behavior^5.

Risk Level: low — test only Testing: Updates

asedeno avatar Oct 18 '24 19:10 asedeno