Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Mar 2019 16:56:36 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r345755 - projects/capsicum-test/contrib/capsicum-test
Message-ID:  <201903311656.x2VGuaf0071354@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903311656.x2VGuaf0071354>