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 libmemcached/libmemcached.la \
13 libmemcached/libmemcachedutil.la \
16 DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
18 PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
21 tests/cpp_example.cc \
26 tests/hash_results.h \
27 tests/libmemcached_world.h
29 # Cycle should always run first
30 tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
31 tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
32 tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
33 tests_cycle_SOURCES= tests/cycle.cc
34 tests_cycle_DEPENDENCIES= $(TESTS_LDADDS)
35 tests_cycle_LDADD= $(tests_cycle_DEPENDENCIES)
36 tests_cycle_LDADD+= ${PTHREAD_LIBS}
37 check_PROGRAMS+= tests/cycle
38 noinst_PROGRAMS+= tests/cycle
40 include tests/libmemcached-1.0/include.am
42 tests_failure_SOURCES= tests/failure.cc
43 tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
44 tests_failure_DEPENDENCIES= $(TESTS_LDADDS)
45 tests_failure_LDADD= $(tests_failure_DEPENDENCIES)
46 check_PROGRAMS+= tests/failure
47 noinst_PROGRAMS+= tests/failure
49 tests_testhashkit_SOURCES = tests/hashkit_functions.cc
50 tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
51 tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES)
52 check_PROGRAMS+= tests/testhashkit
53 noinst_PROGRAMS+= tests/testhashkit
55 tests_hash_plus_SOURCES= tests/hash_plus.cc
56 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
57 tests_hash_plus_DEPENDENCIES= $(tests_testhashkit_DEPENDENCIES)
58 tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
59 check_PROGRAMS+= tests/hash_plus
60 noinst_PROGRAMS+= tests/hash_plus
66 check-local: $(TEST_DOCS)
67 @echo "Tests completed"
69 test-x: test-plus test-memcp test-memdump test-memflush test-memstat
70 @echo "Tests completed"
72 test-mem: tests/var tests/libmemcached-1.0/testapp
73 @tests/libmemcached-1.0/testapp
78 test-atom: tests/var tests/atomsmasher
81 test-plus: tests/var tests/testplus
84 test-hash: tests/var tests/testhashkit
87 test-hashplus: tests/var tests/hash_plus
90 test-cycle: tests/var tests/cycle
93 test-memcapable: tests/var tests/memcapable
96 pahole-mem: tests/testapp
97 @$(PAHOLE_COMMAND) tests/testapp
99 gdb-mem: tests/var tests/libmemcached-1.0/testapp
100 @$(DEBUG_COMMAND) tests/libmemcached-1.0/testapp
103 @$(DEBUG_COMMAND) tests/sasl
105 gdb-atom: tests/atomsmasher
106 @$(DEBUG_COMMAND) tests/atomsmasher
108 gdb-plus: tests/testplus
109 $(DEBUG_COMMAND) tests/testplus
111 gdb-hash: tests/testhashkit
112 @$(DEBUG_COMMAND) tests/testhashkit
114 gdb-hashplus: tests/hash_plus
115 @$(DEBUG_COMMAND) tests/hash_plus
117 gdb-cycle: tests/cycle
118 @$(DEBUG_COMMAND) tests/cycle
120 gdb-failure: tests/failure
121 @$(DEBUG_COMMAND) tests/failure
123 valgrind-cycle: tests/cycle
124 $(VALGRIND_COMMAND) tests/cycle
126 valgrind-mem: tests/testapp
127 @$(VALGRIND_COMMAND) tests/testapp
129 valgrind-failure: tests/failure
130 @$(VALGRIND_COMMAND) tests/failure
132 valgrind-atom: tests/atomsmasher
133 $(VALGRIND_COMMAND) tests/atomsmasher
135 valgrind-plus: tests/testplus
136 @$(VALGRIND_COMMAND) tests/testplus
138 valgrind-sasl: tests/sasl
139 @$(VALGRIND_COMMAND) tests/sasl
141 valgrind-hash: tests/testhashkit
142 @$(VALGRIND_COMMAND) tests/testhashkit
144 valgrind-hashplus: tests/hash_plus
145 @$(VALGRIND_COMMAND) tests/hash_plus
147 helgrind-cycle: tests/cycle
148 @$(HELGRIND_COMMAND) tests/cycle
150 helgrind-mem: tests/testapp
151 @$(HELGRIND_COMMAND) tests/testapp
153 helgrind-atom: tests/atomsmasher
154 @$(HELGRIND_COMMAND) tests/atomsmasher
156 helgrind-plus: tests/testplus
157 @$(HELGRIND_COMMAND) tests/testplus
159 helgrind-hash: tests/testhashkit
160 @$(HELGRIND_COMMAND) tests/testhashkit
162 helgrind-hashplus: tests/hash_plus
163 @$(HELGRIND_COMMAND) tests/hash_plus