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 EXTRA_DIST+= tests/cpp_example.cc
18 noinst_HEADERS+= tests/exist.h
19 noinst_HEADERS+= tests/hash_results.h
20 noinst_HEADERS+= tests/keys.hpp
21 noinst_HEADERS+= tests/libmemcached_test_container.h
22 noinst_HEADERS+= tests/libmemcached_world.h
23 noinst_HEADERS+= tests/libmemcached_world_socket.h
24 noinst_HEADERS+= tests/memc.hpp
25 noinst_HEADERS+= tests/runner.h
27 # Cycle should always run first
28 tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
29 tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
30 tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
31 tests_cycle_SOURCES= tests/cycle.cc
32 tests_cycle_LDADD= $(TESTS_LDADDS)
33 tests_cycle_LDADD+= ${PTHREAD_LIBS}
34 check_PROGRAMS+= tests/cycle
35 noinst_PROGRAMS+= tests/cycle
37 include tests/libmemcached-1.0/include.am
39 include tests/parser.am
41 tests_failure_SOURCES=
42 tests_failure_SOURCES+= tests/failure.cc
43 tests_failure_SOURCES+= clients/execute.cc
44 tests_failure_SOURCES+= clients/generator.cc
45 tests_failure_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
46 tests_failure_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
47 tests_failure_SOURCES+= tests/libmemcached-1.0/generate.cc
48 tests_failure_SOURCES+= tests/libmemcached-1.0/print.cc
50 tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
51 tests_failure_LDADD= $(TESTS_LDADDS)
52 check_PROGRAMS+= tests/failure
53 noinst_PROGRAMS+= tests/failure
55 test-failure: tests/failure
58 gdb-failure: tests/failure
59 @$(GDB_COMMAND) tests/failure
61 tests_testhashkit_SOURCES= tests/hashkit_functions.cc
62 tests_testhashkit_LDADD= libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
63 check_PROGRAMS+= tests/testhashkit
64 noinst_PROGRAMS+= tests/testhashkit
66 test-hash: tests/testhashkit
70 tests_hash_plus_SOURCES= tests/hash_plus.cc
71 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
72 tests_hash_plus_LDADD= $(tests_testhashkit_LDADD)
73 check_PROGRAMS+= tests/hash_plus
74 noinst_PROGRAMS+= tests/hash_plus
80 test-mem: tests/libmemcached-1.0/testapp
81 @tests/libmemcached-1.0/testapp
83 test-atom: tests/atomsmasher
86 test-hashplus: tests/hash_plus
89 test-cycle: tests/cycle
92 test-memcapable: tests/memcapable
95 valgrind-memcapable: tests/memcapable
96 $(VALGRIND_COMMAND) tests/memcapable
98 pahole-mem: tests/testapp
99 @$(PAHOLE_COMMAND) tests/testapp
101 gdb-mem: tests/libmemcached-1.0/testapp
102 @$(GDB_COMMAND) tests/libmemcached-1.0/testapp
104 gdb-atom: tests/atomsmasher
105 @$(GDB_COMMAND) tests/atomsmasher
107 gdb-hash: tests/testhashkit
108 @$(GDB_COMMAND) tests/testhashkit
110 gdb-hashplus: tests/hash_plus
111 @$(GDB_COMMAND) tests/hash_plus
113 gdb-cycle: tests/cycle
114 @$(GDB_COMMAND) tests/cycle
116 valgrind-cycle: tests/cycle
117 $(VALGRIND_COMMAND) tests/cycle
119 valgrind-mem: tests/libmemcached-1.0/testapp
120 @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
122 valgrind-failure: tests/failure
123 @$(VALGRIND_COMMAND) tests/failure
125 valgrind-atom: tests/atomsmasher
126 $(VALGRIND_COMMAND) tests/atomsmasher
128 valgrind-sasl: tests/sasl
129 @$(VALGRIND_COMMAND) tests/sasl
131 valgrind-hash: tests/testhashkit
132 @$(VALGRIND_COMMAND) tests/testhashkit
134 valgrind-hashplus: tests/hash_plus
135 @$(VALGRIND_COMMAND) tests/hash_plus
137 helgrind-cycle: tests/cycle
138 @$(HELGRIND_COMMAND) tests/cycle
140 helgrind-mem: tests/libmemcached-1.0/testapp
141 @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
143 helgrind-atom: tests/atomsmasher
144 @$(HELGRIND_COMMAND) tests/atomsmasher
146 helgrind-hash: tests/testhashkit
147 @$(HELGRIND_COMMAND) tests/testhashkit
149 helgrind-hashplus: tests/hash_plus
150 @$(HELGRIND_COMMAND) tests/hash_plus