freebsd-dev/contrib
Enji Cooper e9e2022e74 Import proof-of-concept for handling GTEST_SKIP() in Environment::SetUp
Per the upstream pull-request [1]:

```
  gtest prior to this change would completely ignore `GTEST_SKIP()` if
  called in `Environment::SetUp()`, instead of bailing out early, unlike
  `Test::SetUp()`, which would cause the tests themselves to be skipped.
  The only way (prior to this change) to skip the tests would be to
  trigger a fatal error via `GTEST_FAIL()`.

  Desirable behavior, in this case, when dealing with
  `Environment::SetUp()` is to check for prerequisites on a system
  (example, kernel supports a particular featureset, e.g., capsicum), and
  skip the tests. The alternatives prior to this change would be
  undesirable:

  - Failing sends the wrong message to the test user, as the result of the
    tests is indeterminate, not failed.
  - Having to add per-test class abstractions that override `SetUp()` to
    test for the capsicum feature set, then skip all of the tests in their
    respective SetUp fixtures, would be a lot of human and computational
    work; checking for the feature would need to be done for all of the
    tests, instead of once for all of the tests.

  For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`,
  by not executing the testcases, is the most desirable solution.

  In order to properly diagnose what happened when running the tests if
  they are skipped, print out the diagnostics in an ad hoc manner.

  Update the documentation to note this change and integrate a new test,
  gtest_skip_in_environment_setup_test, into the test suite.

  This change addresses #2189.

  Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
```

The goal with my merging in this change is to avoid requiring extensive
refactoring/retesting of test suites when ensuring prerequisites are met,
e.g., checking for a CAPABILITIES-enabled kernel before running capsicum-test
(see D19758 for more details).

The proof-of-concept is being imported before accepted by the upstream
project due to the fact that the upstream project is undergoing a potential
development freeze and the maintainers aren't responding to my PR.

1. https://github.com/google/googletest/pull/2203

Reported by:	asomers (https://github.com/google/googletest/issues/2189)
Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D19765
2019-04-01 18:07:48 +00:00
..
amd Fix a broken "SEE ALSO" section of hlfsd(8). 2018-08-14 20:33:48 +00:00
apr
apr-util
atf
bearssl Add libbearssl 2019-02-26 05:59:22 +00:00
binutils Fix binutils compilation error with Clang 8 2019-03-05 04:16:50 +00:00
blacklist Fixup syslog() call that should have used logging function pointer 2019-03-18 15:45:06 +00:00
bmake Merge bmake-20181221 2018-12-23 01:05:52 +00:00
bsnmp Correct a port number assignment. 2019-04-01 12:14:45 +00:00
byacc
bzip2
com_err
compiler-rt Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch 2019-02-15 21:44:42 +00:00
cortex-strings Work around a bug in QEMU when loading data with a load pair instruction 2017-08-26 15:08:27 +00:00
dialog Update libdialog to 1.3-20180621 2018-10-20 20:49:46 +00:00
diff
dma Make dma(8) buildable. 2018-09-19 06:42:05 +00:00
dtc
ee
elftoolchain readelf: add newline after dumping dynamic FLAGS / FLAGS_1 2019-03-28 17:30:47 +00:00
expat Un-break build libexpact. 2018-11-04 18:24:11 +00:00
file file: update to 5.34 2018-08-08 01:33:36 +00:00
flex Terminate filter_create_ext() args with NULL, not 0. 2018-08-08 22:45:30 +00:00
gcc - Update head to 13.0-CURRENT. 2018-10-19 00:37:47 +00:00
gcclibs
gdb Commit forgotten change in gdb allowing to use libedit 2018-02-06 12:17:03 +00:00
gdtoa
googletest Import proof-of-concept for handling GTEST_SKIP() in Environment::SetUp 2019-04-01 18:07:48 +00:00
gperf
hyperv/tools
ipfilter Kernel module shim sources have no business being in the userland 2019-02-03 05:26:07 +00:00
jemalloc Pick 57553c3b1a5592dc4c03f3c6831d9b794e523865 from upstream: 2018-11-14 13:06:48 +00:00
ldns Regenerate: remove GOST, enable DANE-TA now that we have OpenSSL 1.1.1. 2018-10-11 08:14:31 +00:00
ldns-host
less MFV r329552: less v530. 2018-02-19 05:10:22 +00:00
libarchive MFV r345495: 2019-03-25 11:49:57 +00:00
libbegemot Update bsnmp to version 1.13. This does not bring user-visible changes. 2018-07-03 08:44:40 +00:00
libc-pwcache
libc-vis Update vis(3) the latest from NetBSD. 2017-11-28 01:35:28 +00:00
libc++ Merge ^/head r344178 through r344512. 2019-02-25 11:59:29 +00:00
libcxxrt
libdivsufsort
libevent libevent: eliminate in-tree usage of arc4random_addrandom 2018-09-25 17:41:48 +00:00
libexecinfo
libgnuregex
libpcap Re-apply r190640. 2018-05-31 09:11:21 +00:00
libstdc++
libucl
libunwind Move libunwind out of contrib/llvm/projects. 2019-03-12 16:41:17 +00:00
libxo Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
llvm Pull in r356809 from upstream llvm trunk (by Eli Friedman): 2019-03-23 14:10:05 +00:00
lua MFV r337586: lua: Update to 5.3.5 2018-08-14 18:58:01 +00:00
mandoc Add .Lb references for gmock/gtest 2019-02-19 22:35:14 +00:00
mknod
mtree
ncurses
netbsd-tests MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaust 2019-03-26 02:21:09 +00:00
netcat
ngatm
ntp MFV r344878: 2019-03-07 13:36:00 +00:00
nvi vi: fix UTF-8 detection. 2018-11-26 15:33:55 +00:00
ofed libcxgb4: Don't spam stderr. Write combining is not enabled by default 2019-02-27 06:50:24 +00:00
one-true-awk Update awk(1) manual to state an exception to egrep(1)-like RE syntax 2018-11-02 23:03:40 +00:00
openbsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
opencsd/decoder Import OpenCSD -- an ARM CoreSight(tm) Trace Decode Library. 2018-04-04 12:55:31 +00:00
openmp Enable building libomp.so for 32-bit x86. This is done by selectively 2019-03-18 21:04:28 +00:00
openpam Upgrade to OpenPAM Tabebuia. 2019-02-25 18:41:16 +00:00
openresolv
opie Revert r328492: 2018-01-28 03:16:54 +00:00
pam_modules/pam_passwdqc
pf Fix escaping, otherwise Dx gets translated as the macro for DragonFly. 2018-08-11 00:08:59 +00:00
pjdfstest
pnpinfo
processor-trace Import Intel Processor Trace decoder library from 2018-03-19 18:59:15 +00:00
sendmail Make sendmail work with OpenSSL 1.1 API. Taken from the ports tree. 2018-10-01 20:55:01 +00:00
serf MFV r339226 (peter): Record merge of serf-1.3.9. 2018-10-08 15:16:04 +00:00
smbfs smbutil(1): Improve mdoc formatting. 2018-11-14 15:15:07 +00:00
sqlite3 MFV r342175: 2018-12-18 01:12:30 +00:00
subversion Update svn-1.9.7 to 1.10.0. 2018-05-08 04:52:52 +00:00
tcp_wrappers Reduce the log level of tcpd_warn calls from ERR to WARNING. 2018-08-23 20:44:26 +00:00
tcpdump Don't register IOCTLs with capsicum when there is no valid file descriptor. 2018-12-12 09:51:10 +00:00
tcsh
telnet Make telnet(1) buildable. 2018-09-19 07:01:22 +00:00
tnftp Switch the default pager for most commands to less 2018-08-08 19:24:20 +00:00
traceroute libcasper: ange the name of limits in cap_dns so the intentions are obvious. 2018-11-12 15:52:45 +00:00
tzcode Remove no longer relevant comment, as suggested by imp@. 2018-10-30 15:44:16 +00:00
tzdata Import tzdata 2019a 2019-03-26 08:10:51 +00:00
unbound Merge upstream r4932: turn so-reuseport option off by default. 2018-11-01 23:42:35 +00:00
unvis
vis
wpa MFV r341618: 2018-12-09 06:45:49 +00:00
xz Clamp tuklib_physmem() return value to SIZE_T_MAX. 2019-01-06 23:59:04 +00:00
zlib MFV: r323381 2017-09-10 01:25:15 +00:00