Put gtest stuff back in check_PROGRAMS... ensure that tests all run as part
authorMonty Taylor <mordred@inaugust.com>
Wed, 30 Jun 2010 15:08:57 +0000 (08:08 -0700)
committerMonty Taylor <mordred@inaugust.com>
Wed, 30 Jun 2010 15:08:57 +0000 (08:08 -0700)
of make distcheck. Make sure make unit works.

Makefile.am
tests/include.am
unittests/include.am

index 38f87c5e76f02c643bba3927fb707831afb4ec89..0728e01d21d6159c080927968ba8e984adb1fd57 100644 (file)
@@ -45,8 +45,6 @@ include support/include.am
 
 TESTS += ${check_PROGRAMS}
 
-check-local: test-no-outputdiff
-
 
 fedora:
        rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
index 3631a81e25713fc083b4b2d24ff9f2b33a3ab866..c29899fd4471861eaf5089839002ed680ae6a4ba 100644 (file)
@@ -89,10 +89,12 @@ tests_memplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
 tests_memplus_DEPENDENCIES = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
 tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES)
 
-test: unittests-run test-docs test-mem test-hash memcapable
+test: check
+
+check-local: test-docs test-mem test-hash memcapable
        echo "Tests completed"
 
-test-x: test-docs test-plus test-mem test-hash memcapable test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
+test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
        echo "Tests completed"
 
 memcapable: clients/memcapable
index fc67e93762e7bde86dc62adc2d1ef33aaf816376..e5ee884b0df964c64ad9c0fd06258e0550184bd6 100644 (file)
@@ -3,21 +3,17 @@
 # All paths should be given relative to the root
 
 if HAVE_LIBGTEST
-UNITTEST_PROGRAM= unittests/unittests
-
-noinst_PROGRAMS += $(UNITTEST_PROGRAM)
+check_PROGRAMS += unittests/unittests
+endif
 
 unittests_unittests_SOURCES= \
-                            unittests/strings.cc \
-                            unittests/main.cc
+                            unittests/main.cc \
+                            unittests/strings.cc
+
 unittests_unittests_LDADD= \
                           tests/libserver.la \
                           libmemcached/libmemcachedinternal.la \
                           ${TESTS_LDADDS} ${LTLIBGTEST}
-endif
-
 # Shorthand
-unit: unittests-run
+unit: check-TESTS
 
-unittests-run: $(UNITTEST_PROGRAM)
-       $(UNITTEST_PROGRAM)