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
24 testapp_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION}
25 testapp_SOURCES = test.c function.c server.c ../clients/generator.c ../clients/execute.c
26 testapp_LDADD = $(LDADDS)
28 testplus_SOURCES = test.c plus.cpp server.c
29 testplus_LDADD = $(LDADDS)
31 udptest_SOURCES = test.c udp.c server.c
32 udptest_LDADD = $(LDADDS)
34 atomsmasher_SOURCES = test.c atomsmasher.c server.c ../clients/generator.c ../clients/execute.c
35 atomsmasher_LDADD = $(LDADDS)
37 startservers_SOURCES = start.c server.c
38 startservers_LDADD = $(LDADDS)
41 ./testapp > output.res
44 sh t/memcat.test > r/memcat.res
45 sh t/memcp.test > r/memcp.res
46 sh t/memrm.test > r/memrm.res
47 sh t/memslap.test > r/memslap.res
48 sh t/memstat.test > r/memstat.res
51 ./testapp extended > output2.res
53 test: testapp library_test
54 echo "Tests completed"
57 ./testapp > output.cmp
58 diff output.res output.cmp
61 memcached -d -P /tmp/Xumemc.pid -p 12555
62 export MEMCACHED_SERVERS="localhost:12555"
63 sh t/memcat.test > r/memcat.cmp
64 diff r/memcat.res r/memcat.cmp
65 sh t/memcp.test > r/memcp.cmp
66 diff r/memcp.res r/memcp.cmp
67 sh t/memrm.test > r/memrm.cmp
68 diff r/memrm.res r/memrm.cmp
69 sh t/memslap.test > r/memslap.cmp
70 diff r/memslap.res r/memslap.cmp
71 sh t/memstat.test > r/memstat.cmp
72 diff r/memstat.res r/memstat.cmp
73 cat /tmp/Xumemc.pid | xargs kill
77 libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes testapp
80 rm -f cachegrind.out.*
81 libtool --mode=execute valgrind --tool=cachegrind --branch-sim=yes testapp
82 cg_annotate cachegrind.out.* --auto=yes > /tmp/cachegrind.out
86 libtool --mode=execute valgrind --tool=callgrind testapp
87 callgrind_annotate callgrind.out.* --auto=yes > /tmp/callgrind.out
91 libtool --mode=execute valgrind --tool=helgrind testapp
94 libtool --mode=execute valgrind --tool=helgrind ../clients/memslap --server=localhost --concurrency=30
96 test-no-outputdiff: testapp
98 @echo "Test completed"