2 # Copyright (C) 2011 Data Differential
5 # Use and distribution licensed under the BSD license. See
6 # the COPYING file in the parent directory for full text.
8 # included from Top Level Makefile.am
9 # All paths should be given relative to the root
12 TESTS_LDADDS+= libmemcached/libmemcached.la
13 TESTS_LDADDS+= libmemcached/libmemcachedutil.la
14 TESTS_LDADDS+= libtest/libtest.la
16 DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
18 PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
20 EXTRA_DIST+= tests/cpp_example.cc
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
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
42 include tests/libmemcached-1.0/include.am
44 tests_failure_SOURCES=
45 tests_failure_SOURCES+= tests/failure.cc
46 tests_failure_SOURCES+= clients/execute.cc
47 tests_failure_SOURCES+= clients/generator.cc
48 tests_failure_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
49 tests_failure_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
50 tests_failure_SOURCES+= tests/libmemcached-1.0/generate.cc
52 tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
53 tests_failure_DEPENDENCIES= $(TESTS_LDADDS)
54 tests_failure_LDADD= $(tests_failure_DEPENDENCIES)
55 check_PROGRAMS+= tests/failure
56 noinst_PROGRAMS+= tests/failure
58 tests_testhashkit_SOURCES = tests/hashkit_functions.cc
59 tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
60 tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES)
61 check_PROGRAMS+= tests/testhashkit
62 noinst_PROGRAMS+= tests/testhashkit
64 tests_hash_plus_SOURCES= tests/hash_plus.cc
65 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
66 tests_hash_plus_DEPENDENCIES= $(tests_testhashkit_DEPENDENCIES)
67 tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
68 check_PROGRAMS+= tests/hash_plus
69 noinst_PROGRAMS+= tests/hash_plus
75 check-local: $(TEST_DOCS)
76 @echo "Tests completed"
78 test-mem: tests/libmemcached-1.0/testapp
79 @tests/libmemcached-1.0/testapp
84 test-atom: tests/atomsmasher
87 test-plus: tests/testplus
90 test-hash: tests/testhashkit
93 test-hashplus: tests/hash_plus
96 test-cycle: tests/cycle
99 test-memcapable: tests/memcapable
102 pahole-mem: tests/testapp
103 @$(PAHOLE_COMMAND) tests/testapp
105 gdb-mem: tests/libmemcached-1.0/testapp
106 @$(DEBUG_COMMAND) tests/libmemcached-1.0/testapp
109 @$(DEBUG_COMMAND) tests/sasl
111 gdb-atom: tests/atomsmasher
112 @$(DEBUG_COMMAND) tests/atomsmasher
114 gdb-plus: tests/testplus
115 $(DEBUG_COMMAND) tests/testplus
117 gdb-hash: tests/testhashkit
118 @$(DEBUG_COMMAND) tests/testhashkit
120 gdb-hashplus: tests/hash_plus
121 @$(DEBUG_COMMAND) tests/hash_plus
123 gdb-cycle: tests/cycle
124 @$(DEBUG_COMMAND) tests/cycle
126 gdb-failure: tests/failure
127 @$(DEBUG_COMMAND) tests/failure
129 valgrind-cycle: tests/cycle
130 $(VALGRIND_COMMAND) tests/cycle
132 valgrind-mem: tests/libmemcached-1.0/testapp
133 @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
135 valgrind-failure: tests/failure
136 @$(VALGRIND_COMMAND) tests/failure
138 valgrind-atom: tests/atomsmasher
139 $(VALGRIND_COMMAND) tests/atomsmasher
141 valgrind-plus: tests/testplus
142 @$(VALGRIND_COMMAND) tests/testplus
144 valgrind-sasl: tests/sasl
145 @$(VALGRIND_COMMAND) tests/sasl
147 valgrind-hash: tests/testhashkit
148 @$(VALGRIND_COMMAND) tests/testhashkit
150 valgrind-hashplus: tests/hash_plus
151 @$(VALGRIND_COMMAND) tests/hash_plus
153 helgrind-cycle: tests/cycle
154 @$(HELGRIND_COMMAND) tests/cycle
156 helgrind-mem: tests/libmemcached-1.0/testapp
157 @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
159 helgrind-atom: tests/atomsmasher
160 @$(HELGRIND_COMMAND) tests/atomsmasher
162 helgrind-plus: tests/testplus
163 @$(HELGRIND_COMMAND) tests/testplus
165 helgrind-hash: tests/testhashkit
166 @$(HELGRIND_COMMAND) tests/testhashkit
168 helgrind-hashplus: tests/hash_plus
169 @$(HELGRIND_COMMAND) tests/hash_plus