Update testing to allow for distributed testing.
[awesomized/libmemcached] / tests / include.am
1 # vim:ft=automake
2 # Copyright (C) 2011 Data Differential
3 # All rights reserved.
4 #
5 # Use and distribution licensed under the BSD license. See
6 # the COPYING file in the parent directory for full text.
7 #
8 # included from Top Level Makefile.am
9 # All paths should be given relative to the root
10
11 TESTS_LDADDS= \
12 libmemcached/libmemcached.la \
13 libmemcached/libmemcachedutil.la \
14 libtest/libtest.la
15
16 DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
17
18 PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
19
20 EXTRA_DIST+= \
21 tests/cpp_example.cc \
22 tests/output_plus.res
23
24 noinst_HEADERS+= \
25 tests/exist.h \
26 tests/hash_results.h \
27 tests/libmemcached_world.h \
28 tests/libmemcached_world_socket.h
29
30 # Cycle should always run first
31 tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
32 tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
33 tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
34 tests_cycle_SOURCES= tests/cycle.cc
35 tests_cycle_DEPENDENCIES= $(TESTS_LDADDS)
36 tests_cycle_LDADD= $(tests_cycle_DEPENDENCIES)
37 tests_cycle_LDADD+= ${PTHREAD_LIBS}
38 check_PROGRAMS+= tests/cycle
39 noinst_PROGRAMS+= tests/cycle
40
41 include tests/libmemcached-1.0/include.am
42
43 tests_failure_SOURCES= tests/failure.cc
44 tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
45 tests_failure_DEPENDENCIES= $(TESTS_LDADDS)
46 tests_failure_LDADD= $(tests_failure_DEPENDENCIES)
47 check_PROGRAMS+= tests/failure
48 noinst_PROGRAMS+= tests/failure
49
50 tests_testhashkit_SOURCES = tests/hashkit_functions.cc
51 tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
52 tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES)
53 check_PROGRAMS+= tests/testhashkit
54 noinst_PROGRAMS+= tests/testhashkit
55
56 tests_hash_plus_SOURCES= tests/hash_plus.cc
57 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
58 tests_hash_plus_DEPENDENCIES= $(tests_testhashkit_DEPENDENCIES)
59 tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
60 check_PROGRAMS+= tests/hash_plus
61 noinst_PROGRAMS+= tests/hash_plus
62
63 include tests/cli.am
64
65 test: check
66
67 check-local: $(TEST_DOCS)
68 @echo "Tests completed"
69
70 test-x: test-plus test-memcp test-memdump test-memflush test-memstat
71 @echo "Tests completed"
72
73 test-mem: tests/var tests/libmemcached-1.0/testapp
74 @tests/libmemcached-1.0/testapp
75
76 test-sasl: tests/sasl
77 @tests/sasl
78
79 test-atom: tests/var tests/atomsmasher
80 @tests/atomsmasher
81
82 test-plus: tests/var tests/testplus
83 @tests/testplus
84
85 test-hash: tests/var tests/testhashkit
86 @tests/testhashkit
87
88 test-hashplus: tests/var tests/hash_plus
89 @tests/hash_plus
90
91 test-cycle: tests/var tests/cycle
92 @tests/cycle
93
94 test-memcapable: tests/var tests/memcapable
95 @tests/memcapable
96
97 pahole-mem: tests/testapp
98 @$(PAHOLE_COMMAND) tests/testapp
99
100 gdb-mem: tests/var tests/libmemcached-1.0/testapp
101 @$(DEBUG_COMMAND) tests/libmemcached-1.0/testapp
102
103 gdb-sasl: tests/sasl
104 @$(DEBUG_COMMAND) tests/sasl
105
106 gdb-atom: tests/atomsmasher
107 @$(DEBUG_COMMAND) tests/atomsmasher
108
109 gdb-plus: tests/testplus
110 $(DEBUG_COMMAND) tests/testplus
111
112 gdb-hash: tests/testhashkit
113 @$(DEBUG_COMMAND) tests/testhashkit
114
115 gdb-hashplus: tests/hash_plus
116 @$(DEBUG_COMMAND) tests/hash_plus
117
118 gdb-cycle: tests/cycle
119 @$(DEBUG_COMMAND) tests/cycle
120
121 gdb-failure: tests/failure
122 @$(DEBUG_COMMAND) tests/failure
123
124 valgrind-cycle: tests/cycle
125 $(VALGRIND_COMMAND) tests/cycle
126
127 valgrind-mem: tests/testapp
128 @$(VALGRIND_COMMAND) tests/testapp
129
130 valgrind-failure: tests/failure
131 @$(VALGRIND_COMMAND) tests/failure
132
133 valgrind-atom: tests/atomsmasher
134 $(VALGRIND_COMMAND) tests/atomsmasher
135
136 valgrind-plus: tests/testplus
137 @$(VALGRIND_COMMAND) tests/testplus
138
139 valgrind-sasl: tests/sasl
140 @$(VALGRIND_COMMAND) tests/sasl
141
142 valgrind-hash: tests/testhashkit
143 @$(VALGRIND_COMMAND) tests/testhashkit
144
145 valgrind-hashplus: tests/hash_plus
146 @$(VALGRIND_COMMAND) tests/hash_plus
147
148 helgrind-cycle: tests/cycle
149 @$(HELGRIND_COMMAND) tests/cycle
150
151 helgrind-mem: tests/testapp
152 @$(HELGRIND_COMMAND) tests/testapp
153
154 helgrind-atom: tests/atomsmasher
155 @$(HELGRIND_COMMAND) tests/atomsmasher
156
157 helgrind-plus: tests/testplus
158 @$(HELGRIND_COMMAND) tests/testplus
159
160 helgrind-hash: tests/testhashkit
161 @$(HELGRIND_COMMAND) tests/testhashkit
162
163 helgrind-hashplus: tests/hash_plus
164 @$(HELGRIND_COMMAND) tests/hash_plus