Merged
[m6w6/libmemcached] / tests / Makefile.am
1 INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/lib
2 LDADDS = ../lib/libmemcached.la
3
4 EXTRA_DIST = output.res output2.res\
5 r/memcat.res\
6 r/memcp.res\
7 r/memrm.res\
8 r/memslap.res\
9 r/memstat.res\
10 t/memcat.test\
11 t/memcp.test\
12 t/memrm.test\
13 t/memslap.test\
14 t/memstat.test
15
16 LIBS =
17
18 noinst_HEADERS = test.h
19 noinst_PROGRAMS = testapp testplus
20
21 testapp_SOURCES = test.c function.c ../src/generator.c ../src/execute.c
22 testapp_LDADD = $(LDADDS)
23
24 testplus_SOURCES = test.c plus.cpp
25 testplus_LDADD = $(LDADDS) ../lib/libmemcached.la
26
27 record:
28 ./testapp > output.res
29
30 client-record:
31 sh t/memcat.test > r/memcat.res
32 sh t/memcp.test > r/memcp.res
33 sh t/memrm.test > r/memrm.res
34 sh t/memslap.test > r/memslap.res
35 sh t/memstat.test > r/memstat.res
36
37 record-extended:
38 ./testapp extended > output2.res
39
40 test: testapp library_test
41 echo "Tests completed"
42
43 library_test:
44 ./testapp > output.cmp
45 diff output.res output.cmp
46
47 clients:
48 memcached -d -P /tmp/Xumemc.pid -p 12555
49 export MEMCACHED_SERVERS="localhost:12555"
50 sh t/memcat.test > r/memcat.cmp
51 diff r/memcat.res r/memcat.cmp
52 sh t/memcp.test > r/memcp.cmp
53 diff r/memcp.res r/memcp.cmp
54 sh t/memrm.test > r/memrm.cmp
55 diff r/memrm.res r/memrm.cmp
56 sh t/memslap.test > r/memslap.cmp
57 diff r/memslap.res r/memslap.cmp
58 sh t/memstat.test > r/memstat.cmp
59 diff r/memstat.res r/memstat.cmp
60 cat /tmp/Xumemc.pid | xargs kill
61 rm /tmp/Xumemc.pid
62
63 valgrind:
64 libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes testapp