HomeFreeBSD

Refine r345743

Description

Refine r345743

Add backwards compatibility shim for versions of googletest without
GTEST_SKIP() and https://github.com/google/googletest/pull/2203, e.g., the
version of googletest in ports and the embedded version in the
capsicum-test project, mapping to GTEST_FAIL(). The goal in this case was
to make capsicum-test do a hard stop and not execute if the kernel didn't
have capsicum support or kern.trap_enotcap was enabled. The only way to
achieve this prior to https://github.com/google/googletest/pull/2203, was to
trigger a fatal failure, e.g., call GTEST_FAIL().

Output the skip diagnostic message via std::cerr, instead of using the
GTEST_{FAIL,SKIP}() macros. For some reason I don't yet understand, the
diagnostic messages aren't being output when both macros are triggered, so
there's a bug potentially with googletest version 1.8.1 (but not master) where
it's not properly outputting the messages.

Details

Provenance
ngieAuthored on
Parents
rS345744: random(4): Attempt to persist entropy promptly
Branches
Unknown
Tags
Unknown