1 LDADDS = $(top_builddir)/libmemcached/libmemcached.la
3 if BUILD_LIBMEMCACHEDUTIL
4 LDADDS+= $(top_builddir)/libmemcachedutil/libmemcachedutil.la
7 EXTRA_DIST = output.res output2.res\
21 noinst_HEADERS = test.h server.h ketama_test_cases.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 = $(LDADDS) $(top_builddir)/clients/libgenexec.la libtest.la libserver.la
32 testplus_SOURCES = plus.cpp
33 testplus_LDADD = $(LDADDS) libtest.la libserver.la
35 udptest_SOURCES = udp.c
36 udptest_LDADD = $(LDADDS) libtest.la libserver.la
38 atomsmasher_SOURCES = atomsmasher.c
39 atomsmasher_LDADD = $(LDADDS) $(top_builddir)/clients/libgenexec.la libtest.la libserver.la
41 startservers_SOURCES = start.c
42 startservers_LDADD = $(LDADDS) libserver.la
45 ./testapp > output.res
46 ./testplus > output_plus.res
49 sh t/memcat.test > r/memcat.res
50 sh t/memcp.test > r/memcp.res
51 sh t/memrm.test > r/memrm.res
52 sh t/memslap.test > r/memslap.res
53 sh t/memstat.test > r/memstat.res
56 ./testapp extended > output2.res
58 test: testapp testplus library_test
59 echo "Tests completed"
62 ./testapp > output.cmp
63 diff output.res output.cmp
64 # ./testplus > output_plus.cmp
65 # diff output_plus.res output_plus.cmp
68 memcached -d -P /tmp/Xumemc.pid -p 12555
69 export MEMCACHED_SERVERS="localhost:12555"
70 sh t/memcat.test > r/memcat.cmp
71 diff r/memcat.res r/memcat.cmp
72 sh t/memcp.test > r/memcp.cmp
73 diff r/memcp.res r/memcp.cmp
74 sh t/memrm.test > r/memrm.cmp
75 diff r/memrm.res r/memrm.cmp
76 sh t/memslap.test > r/memslap.cmp
77 diff r/memslap.res r/memslap.cmp
78 sh t/memstat.test > r/memstat.cmp
79 diff r/memstat.res r/memstat.cmp
80 cat /tmp/Xumemc.pid | xargs kill
84 libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes testapp
87 rm -f cachegrind.out.*
88 libtool --mode=execute valgrind --tool=cachegrind --branch-sim=yes testapp
89 cg_annotate cachegrind.out.* --auto=yes > /tmp/cachegrind.out
93 libtool --mode=execute valgrind --tool=callgrind testapp
94 callgrind_annotate callgrind.out.* --auto=yes > /tmp/callgrind.out
98 libtool --mode=execute valgrind --tool=helgrind testapp
101 libtool --mode=execute valgrind --tool=helgrind ${top_builddir}/clients/memslap --server=localhost --concurrency=30
103 test-no-outputdiff: testapp
104 ./testapp > /dev/null
105 @echo "Test completed"