From 7578f29e57a07d90dad0cb63b64adce9c8487dd4 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 30 Jun 2010 08:08:57 -0700 Subject: [PATCH] Put gtest stuff back in check_PROGRAMS... ensure that tests all run as part of make distcheck. Make sure make unit works. --- Makefile.am | 2 -- tests/include.am | 6 ++++-- unittests/include.am | 16 ++++++---------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index 38f87c5e..0728e01d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/tests/include.am b/tests/include.am index 3631a81e..c29899fd 100644 --- a/tests/include.am +++ b/tests/include.am @@ -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 diff --git a/unittests/include.am b/unittests/include.am index fc67e937..e5ee884b 100644 --- a/unittests/include.am +++ b/unittests/include.am @@ -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) -- 2.30.2