svn commit: r345750 - in projects/kyua-use-googletest-test-interface/lib/googletest: gmock/tests gtest/tests gtest_main/tests

Enji Cooper ngie at FreeBSD.org
Sun Mar 31 06:21:33 UTC 2019


Author: ngie
Date: Sun Mar 31 06:21:32 2019
New Revision: 345750
URL: https://svnweb.freebsd.org/changeset/base/345750

Log:
  Use the test engine interface plain for some googlemock/googletest provided tests
  
  The issues are as follows:
  i.   Some tests don't execute `RUN_ALL_TESTS()`.
  ii.  Some tests incorrectly analyze the results when `--gtest_list_tests` is
       specified on the command line.
  iii. Some tests assume all tests are run (in order to analyze the results at
       the end of the test program as part of Environment::TearDown()).
  
  The above items cause Kyua googletest engine to bail, since there is spurious
  output on the command line (in the case of i. and ii.), or failures/asserts are
  needlessly triggered (in the case of iii.).
  
  Add comments noting why the testcases cannot use the googletest interface, along
  with their respective googletest issues.
  
  Case ii:  https://github.com/google/googletest/issues/2204
  Case iii: https://github.com/google/googletest/issues/2205

Modified:
  projects/kyua-use-googletest-test-interface/lib/googletest/gmock/tests/Makefile
  projects/kyua-use-googletest-test-interface/lib/googletest/gtest/tests/Makefile
  projects/kyua-use-googletest-test-interface/lib/googletest/gtest_main/tests/Makefile

Modified: projects/kyua-use-googletest-test-interface/lib/googletest/gmock/tests/Makefile
==============================================================================
--- projects/kyua-use-googletest-test-interface/lib/googletest/gmock/tests/Makefile	Sun Mar 31 06:20:00 2019	(r345749)
+++ projects/kyua-use-googletest-test-interface/lib/googletest/gmock/tests/Makefile	Sun Mar 31 06:21:32 2019	(r345750)
@@ -8,6 +8,11 @@ GTESTS+=	gmock_stress_test
 
 LIBADD+=	pthread gtest gmock
 
+# This test cannot selectively run a single test, as it verifies results when
+# `--gtest_list_tests` is run:
+# https://github.com/google/googletest/issues/2204
+TEST_INTERFACE.gmock_stress_test=	plain
+
 # The next release will resolve a number of build warnings issues.
 NO_WERROR=
 

Modified: projects/kyua-use-googletest-test-interface/lib/googletest/gtest/tests/Makefile
==============================================================================
--- projects/kyua-use-googletest-test-interface/lib/googletest/gtest/tests/Makefile	Sun Mar 31 06:20:00 2019	(r345749)
+++ projects/kyua-use-googletest-test-interface/lib/googletest/gtest/tests/Makefile	Sun Mar 31 06:21:32 2019	(r345750)
@@ -36,6 +36,17 @@ SRCS.googletest-param-test-test=	\
 
 LIBADD+=	gtest
 
+# These tests confuse the kyua googletest engine, as they don't conform to the
+# googletest spec; they're functional unit tests for the library.
+TEST_INTERFACE.gtest_environment_test= plain
+TEST_INTERFACE.gtest_no_test_unittest= plain
+TEST_INTERFACE.gtest_repeat_test= plain
+TEST_INTERFACE.gtest_stress_test= plain
+TEST_INTERFACE.gtest_throw_on_failure_ex_test= plain
+# This test program cannot selectively run test suites/testcases:
+# https://github.com/google/googletest/issues/2205
+TEST_INTERFACE.gtest-unittest-api_test= plain
+
 # XXX: explicitly listing -lpthread is incorrect. src.libnames.mk should be
 #      handling this.
 LIBADD.gtest_stress_test+=	pthread

Modified: projects/kyua-use-googletest-test-interface/lib/googletest/gtest_main/tests/Makefile
==============================================================================
--- projects/kyua-use-googletest-test-interface/lib/googletest/gtest_main/tests/Makefile	Sun Mar 31 06:20:00 2019	(r345749)
+++ projects/kyua-use-googletest-test-interface/lib/googletest/gtest_main/tests/Makefile	Sun Mar 31 06:21:32 2019	(r345750)
@@ -21,6 +21,11 @@ GTESTS+=	gtest-typed-test_test
 GTESTS+=	gtest_skip_test
 GTESTS+=	gtest_unittest
 
+# This test cannot selectively run a single test, as it verifies results when
+# `--gtest_list_tests` is run:
+# https://github.com/google/googletest/issues/2204
+TEST_INTERFACE.googletest-listener-test=	plain
+
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}
 


More information about the svn-src-projects mailing list