svn commit: r345749 - projects/kyua-use-googletest-test-interface/share/mk

Enji Cooper ngie at FreeBSD.org
Tue Sep 3 14:06:02 UTC 2019


Author: ngie
Date: Sun Mar 31 06:20:00 2019
New Revision: 345749
URL: https://svnweb.freebsd.org/changeset/base/345749

Log:
  Improve googletest integration with kyua
  
  This change modifies googletest.test.mk to use experimental googletest support
  in kyua, available as part of the `add-googletest-support` feature branch in
  https://github.com/ngie-eign/kyua. The experimental support provides test suite
  and test case level execution and result reporting, instead of requiring
  googletests to be run as the plain tests.
  
  As such, make the default GTESTS test engine interface googletest, providing
  a backwards compatibility knob, GTESTS_USE_PLAIN_TEST_INTERFACE, so
  end-users with older versions of kyua can run the googletest tests.
  
  While here, provide a per-PROG test interface hook for GTESTS. In short,
  not all of the googlemock and googletest provided tests conform to the
  format described in the googletest docs. Thus, they are better run as plain
  tests.

Modified:
  projects/kyua-use-googletest-test-interface/share/mk/googletest.test.mk

Modified: projects/kyua-use-googletest-test-interface/share/mk/googletest.test.mk
==============================================================================
--- projects/kyua-use-googletest-test-interface/share/mk/googletest.test.mk	Sun Mar 31 06:16:07 2019	(r345748)
+++ projects/kyua-use-googletest-test-interface/share/mk/googletest.test.mk	Sun Mar 31 06:20:00 2019	(r345749)
@@ -26,6 +26,16 @@
 # manpage.
 GTESTS?=
 
+# Default test interface for googletest
+#
+# This knob should be used if the version of kyua in use doesn't support the
+# `googletest` test interface.
+.ifdef GTESTS_USE_PLAIN_TEST_INTERFACE
+GTESTS_DEFAULT_TEST_INTERFACE=	plain
+.else
+GTESTS_DEFAULT_TEST_INTERFACE=	googletest
+.endif
+
 .if !empty(GTESTS)
 .include <googletest.test.inc.mk>
 
@@ -36,6 +46,6 @@ BINDIR.${_T}= ${TESTSDIR}
 CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS}
 MAN.${_T}?= # empty
 SRCS.${_T}?= ${_T}.cc
-TEST_INTERFACE.${_T}= plain
+TEST_INTERFACE.${_T}?= ${GTESTS_DEFAULT_TEST_INTERFACE}
 .endfor
 .endif




More information about the svn-src-projects mailing list