Merge working tree with build tree.
[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 TESTS_LDADDS+= libmemcached/libmemcached.la
13 TESTS_LDADDS+= libmemcached/libmemcachedutil.la
14 TESTS_LDADDS+= libtest/libtest.la
15
16 DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
17
18 PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
19
20 EXTRA_DIST+= tests/cpp_example.cc
21
22 noinst_HEADERS+= tests/exist.h
23 noinst_HEADERS+= tests/hash_results.h
24 noinst_HEADERS+= tests/keys.hpp
25 noinst_HEADERS+= tests/libmemcached_test_container.h
26 noinst_HEADERS+= tests/libmemcached_world.h
27 noinst_HEADERS+= tests/libmemcached_world_socket.h
28 noinst_HEADERS+= tests/memc.h
29 noinst_HEADERS+= tests/runner.h
30
31 # Cycle should always run first
32 tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
33 tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
34 tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
35 tests_cycle_SOURCES= tests/cycle.cc
36 tests_cycle_DEPENDENCIES= $(TESTS_LDADDS)
37 tests_cycle_LDADD= $(tests_cycle_DEPENDENCIES)
38 tests_cycle_LDADD+= ${PTHREAD_LIBS}
39 check_PROGRAMS+= tests/cycle
40 noinst_PROGRAMS+= tests/cycle
41
42 include tests/libmemcached-1.0/include.am
43
44 include tests/parser.am
45
46 tests_failure_SOURCES=
47 tests_failure_SOURCES+= tests/failure.cc
48 tests_failure_SOURCES+= clients/execute.cc
49 tests_failure_SOURCES+= clients/generator.cc
50 tests_failure_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
51 tests_failure_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
52 tests_failure_SOURCES+= tests/libmemcached-1.0/generate.cc
53 tests_failure_SOURCES+= tests/libmemcached-1.0/print.cc
54
55 tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
56 tests_failure_DEPENDENCIES= $(TESTS_LDADDS)
57 tests_failure_LDADD= $(tests_failure_DEPENDENCIES)
58 check_PROGRAMS+= tests/failure
59 noinst_PROGRAMS+= tests/failure
60
61 test-failure: tests/failure
62 @tests/failure
63
64 gdb-failure: tests/failure
65 @$(DEBUG_COMMAND) tests/failure
66
67
68 tests_testhashkit_SOURCES= tests/hashkit_functions.cc
69 tests_testhashkit_DEPENDENCIES= libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
70 tests_testhashkit_LDADD= $(tests_testhashkit_DEPENDENCIES)
71 check_PROGRAMS+= tests/testhashkit
72 noinst_PROGRAMS+= tests/testhashkit
73
74 test-hash: tests/testhashkit
75 @tests/testhashkit
76
77
78 tests_hash_plus_SOURCES= tests/hash_plus.cc
79 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
80 tests_hash_plus_DEPENDENCIES= $(tests_testhashkit_DEPENDENCIES)
81 tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
82 check_PROGRAMS+= tests/hash_plus
83 noinst_PROGRAMS+= tests/hash_plus
84
85 include tests/cli.am
86
87 test: check
88
89 check-local: $(TEST_DOCS)
90 @echo "Tests completed"
91
92 test-mem: tests/libmemcached-1.0/testapp
93 @tests/libmemcached-1.0/testapp
94
95 test-sasl: tests/sasl
96 @tests/sasl
97
98 test-atom: tests/atomsmasher
99 @tests/atomsmasher
100
101 test-plus: tests/testplus
102 @tests/testplus
103
104 test-hashplus: tests/hash_plus
105 @tests/hash_plus
106
107 test-cycle: tests/cycle
108 @tests/cycle
109
110 test-memcapable: tests/memcapable
111 @tests/memcapable
112
113 pahole-mem: tests/testapp
114 @$(PAHOLE_COMMAND) tests/testapp
115
116 gdb-mem: tests/libmemcached-1.0/testapp
117 @$(DEBUG_COMMAND) tests/libmemcached-1.0/testapp
118
119 gdb-sasl: tests/sasl
120 @$(DEBUG_COMMAND) tests/sasl
121
122 gdb-atom: tests/atomsmasher
123 @$(DEBUG_COMMAND) tests/atomsmasher
124
125 gdb-plus: tests/testplus
126 $(DEBUG_COMMAND) tests/testplus
127
128 gdb-hash: tests/testhashkit
129 @$(DEBUG_COMMAND) tests/testhashkit
130
131 gdb-hashplus: tests/hash_plus
132 @$(DEBUG_COMMAND) tests/hash_plus
133
134 gdb-cycle: tests/cycle
135 @$(DEBUG_COMMAND) tests/cycle
136
137 valgrind-cycle: tests/cycle
138 $(VALGRIND_COMMAND) tests/cycle
139
140 valgrind-mem: tests/libmemcached-1.0/testapp
141 @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
142
143 valgrind-failure: tests/failure
144 @$(VALGRIND_COMMAND) tests/failure
145
146 valgrind-atom: tests/atomsmasher
147 $(VALGRIND_COMMAND) tests/atomsmasher
148
149 valgrind-plus: tests/testplus
150 @$(VALGRIND_COMMAND) tests/testplus
151
152 valgrind-sasl: tests/sasl
153 @$(VALGRIND_COMMAND) tests/sasl
154
155 valgrind-hash: tests/testhashkit
156 @$(VALGRIND_COMMAND) tests/testhashkit
157
158 valgrind-hashplus: tests/hash_plus
159 @$(VALGRIND_COMMAND) tests/hash_plus
160
161 helgrind-cycle: tests/cycle
162 @$(HELGRIND_COMMAND) tests/cycle
163
164 helgrind-mem: tests/libmemcached-1.0/testapp
165 @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
166
167 helgrind-atom: tests/atomsmasher
168 @$(HELGRIND_COMMAND) tests/atomsmasher
169
170 helgrind-plus: tests/testplus
171 @$(HELGRIND_COMMAND) tests/testplus
172
173 helgrind-hash: tests/testhashkit
174 @$(HELGRIND_COMMAND) tests/testhashkit
175
176 helgrind-hashplus: tests/hash_plus
177 @$(HELGRIND_COMMAND) tests/hash_plus