1 LDADDS = $(top_builddir)/libmemcached/libmemcached.la
3 if BUILD_LIBMEMCACHEDUTIL
4 LDADDS+= $(top_builddir)/libmemcached/libmemcachedutil.la
21 noinst_HEADERS = test.h server.h ketama_test_cases.h ketama_test_cases_spy.h hash_results.h libmemcached_world.h
22 noinst_PROGRAMS = testapp testplus udptest atomsmasher startservers
23 noinst_LTLIBRARIES= libserver.la libtest.la
25 libserver_la_SOURCES= server.c
26 libtest_la_SOURCES= test.c
28 testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
29 testapp_SOURCES = function.c
30 testapp_LDADD = $(top_builddir)/clients/libgenexec.la libtest.la libserver.la $(LDADDS)
32 testplus_SOURCES = plus.cpp
33 testplus_LDADD = libtest.la libserver.la $(LDADDS)
35 udptest_SOURCES = udp.c
36 udptest_LDADD = libtest.la libserver.la $(LDADDS)
38 atomsmasher_SOURCES = atomsmasher.c
39 atomsmasher_LDADD = $(top_builddir)/clients/libgenexec.la libtest.la libserver.la $(LDADDS)
41 startservers_SOURCES = start.c
42 startservers_LDADD = libserver.la $(LDADDS)
45 sh t/memcat.test > r/memcat.res
46 sh t/memcp.test > r/memcp.res
47 sh t/memrm.test > r/memrm.res
48 sh t/memslap.test > r/memslap.res
49 sh t/memstat.test > r/memstat.res
51 test: testapp testplus library_test memcapable
52 echo "Tests completed"
59 @MEMC_BINARY@ -d -P /tmp/Xumemc.pid -p 12555
60 @$(top_builddir)/clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
61 @cat /tmp/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
65 @MEMC_BINARY@ -d -P /tmp/Xumemc.pid -p 12555
66 export MEMCACHED_SERVERS="localhost:12555"
67 sh t/memcat.test > r/memcat.cmp
68 diff r/memcat.res r/memcat.cmp
69 sh t/memcp.test > r/memcp.cmp
70 diff r/memcp.res r/memcp.cmp
71 sh t/memrm.test > r/memrm.cmp
72 diff r/memrm.res r/memrm.cmp
73 sh t/memslap.test > r/memslap.cmp
74 diff r/memslap.res r/memslap.cmp
75 sh t/memstat.test > r/memstat.cmp
76 diff r/memstat.res r/memstat.cmp
77 cat /tmp/Xumemc.pid | xargs kill
81 $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes testapp
84 rm -f cachegrind.out.*
85 $(LIBTOOL) --mode=execute valgrind --tool=cachegrind --branch-sim=yes testapp
86 cg_annotate cachegrind.out.* --auto=yes > /tmp/cachegrind.out
90 $(LIBTOOL) --mode=execute valgrind --tool=callgrind testapp
91 callgrind_annotate callgrind.out.* --auto=yes > /tmp/callgrind.out
95 $(LIBTOOL) --mode=execute valgrind --tool=helgrind testapp
98 $(LIBTOOL) --mode=execute valgrind --tool=helgrind ${top_builddir}/clients/memslap --server=localhost --concurrency=30
100 test-no-outputdiff: test
103 $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --log-file=/tmp/valgrind.out testapp