tests/atomsmasher \
tests/startservers \
tests/testapp \
+ tests/testhashkit \
tests/testplus \
tests/udptest
tests/libserver.la \
tests/libtest.la \
$(TESTS_LDADDS)
+tests_testapp_DEPENDENCIES= $(tests_testapp_LDADD)
tests_testplus_SOURCES= tests/plus.cpp
tests_testplus_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+tests_testplus_DEPENDENCIES= $(tests_testplus_LDADD)
tests_udptest_SOURCES= tests/udp.c
tests_udptest_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+tests_udptest_DEPENDENCIES= $(tests_udptest_LDADD)
tests_atomsmasher_SOURCES= tests/atomsmasher.c
tests_atomsmasher_LDADD= \
tests/libserver.la \
tests/libtest.la \
$(TESTS_LDADDS)
+tests_atomsmasher_DEPENDENCIES= $(tests_atomsmasher_LDADD)
tests_startservers_SOURCES= tests/start.c
tests_startservers_LDADD= tests/libserver.la $(TESTS_LDADDS)
+tests_startservers_DEPENDENCIES= $(tests_startservers_LDADD)
+
+tests_testhashkit_SOURCES = tests/hashkit_functions.c
+tests_testhashkit_LDADD = tests/libtest.la libhashkit/libhashkit.la
+tests_testhashkit_DEPENDENCIES = $(tests_testhashkit_LDADD)
client-record:
sh tests/t/memcat.test > tests/r/memcat.res
sh tests/t/memslap.test > tests/r/memslap.res
sh tests/t/memstat.test > tests/r/memstat.res
-test: tests/testapp tests/testplus library_test memcapable
+test: test-docs tests/testapp tests/testplus library_test memcapable libmhashkit_test
echo "Tests completed"
library_test:
tests/testapp
-# tests/testplus
+
+libmhashkit_test: libhashkit
+ tests/testhashkit
memcapable: clients/memcapable
- @MEMC_BINARY@ -d -P tests/Xumemc.pid -p 12555
+ @MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
@clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
@rm tests/Xumemc.pid
PHONY += clients
clients:
- @MEMC_BINARY@ -d -P tests/Xumemc.pid -p 12555
+ @MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
export MEMCACHED_SERVERS="localhost:12555"
sh tests/t/memcat.test > tests/r/memcat.cmp
diff tests/r/memcat.res tests/r/memcat.cmp
cat tests/Xumemc.pid | xargs kill
rm tests/Xumemc.pid
+gdb-mem:
+ $(LIBTOOL) --mode=execute gdb tests/testapp
+
+gdb-hash:
+ $(LIBTOOL) --mode=execute gdb tests/testhashkit
+
+
PHONY += valgrind
valgrind:
$(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/testapp