svn commit: r345755 - projects/capsicum-test/contrib/capsicum-test
Enji Cooper
ngie at FreeBSD.org
Sun Mar 31 16:56:38 UTC 2019
Author: ngie
Date: Sun Mar 31 16:56:36 2019
New Revision: 345755
URL: https://svnweb.freebsd.org/changeset/base/345755
Log:
Remove comment and fold std::cerr call into GTEST_SKIP()
There's a missing set of commits that is preventing D19765 from working on
this branch (it works on googletest master).
Modified:
projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc
Modified: projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc
==============================================================================
--- projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc Sun Mar 31 14:18:02 2019 (r345754)
+++ projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc Sun Mar 31 16:56:36 2019 (r345755)
@@ -47,10 +47,7 @@ class SetupEnvironment : public ::testing::Environment
trap_enotcap_enabled_len = sizeof(trap_enotcap_enabled);
if (feature_present("security_capabilities") == 0) {
- // XXX (ngie): using std::cerr because 1.8.1 (with GTEST_SKIP support)
- // isn't properly outputting skip diagnostic message here.
- std::cerr << "Tests require a CAPABILITIES enabled kernel" << std::endl;
- GTEST_SKIP();
+ GTEST_SKIP() << "Tests require a CAPABILITIES enabled kernel";
} else {
std::cerr << "Running on a CAPABILITIES enabled kernel - OK!"
<< std::endl;
@@ -62,12 +59,8 @@ class SetupEnvironment : public ::testing::Environment
GTEST_FAIL() << "sysctlbyname failed: " << strerror(errno);
}
if (trap_enotcap_enabled) {
- // XXX (ngie): using std::cerr because 1.8.1 (with GTEST_SKIP support)
- // isn't properly outputting skip diagnostic message here.
- std::cerr << "Sysctl " << oid << " enabled. "
- << "Skipping tests to avoid non-determinism with results"
- << std::endl;
- GTEST_SKIP();
+ GTEST_SKIP() << "Sysctl " << oid << " enabled. "
+ << "Skipping tests to avoid non-determinism with results";
} else {
std::cerr << "Sysctl " << oid << " not enabled - OK!" << std::endl;
}
More information about the svn-src-projects
mailing list