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
62 tests_testhashkit_SOURCES= tests/hashkit_functions.cc
63 tests_testhashkit_LDADD= libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
64 check_PROGRAMS+= tests/testhashkit
65 noinst_PROGRAMS+= tests/testhashkit
67 test-hash: tests/testhashkit
71 tests_hash_plus_SOURCES= tests/hash_plus.cc
72 tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
73 tests_hash_plus_LDADD= $(tests_testhashkit_LDADD)
74 check_PROGRAMS+= tests/hash_plus
75 noinst_PROGRAMS+= tests/hash_plus
81 test-mem: tests/libmemcached-1.0/testapp
82 @tests/libmemcached-1.0/testapp
84 test-atom: tests/atomsmasher
87 test-hashplus: tests/hash_plus
90 test-cycle: tests/cycle
93 test-memcapable: tests/memcapable
96 valgrind-memcapable: tests/memcapable
97 $(VALGRIND_COMMAND) tests/memcapable
99 pahole-mem: tests/testapp
100 @$(PAHOLE_COMMAND) tests/testapp
102 gdb-mem: tests/libmemcached-1.0/testapp
103 @$(GDB_COMMAND) tests/libmemcached-1.0/testapp
105 gdb-atom: tests/atomsmasher
106 @$(GDB_COMMAND) tests/atomsmasher
108 gdb-hash: tests/testhashkit
109 @$(GDB_COMMAND) tests/testhashkit
111 gdb-hashplus: tests/hash_plus
112 @$(GDB_COMMAND) tests/hash_plus
114 gdb-cycle: tests/cycle
115 @$(GDB_COMMAND) tests/cycle
117 valgrind-cycle: tests/cycle
118 $(VALGRIND_COMMAND) tests/cycle
120 valgrind-mem: tests/libmemcached-1.0/testapp
121 @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
123 valgrind-failure: tests/failure
124 @$(VALGRIND_COMMAND) tests/failure
126 valgrind-atom: tests/atomsmasher
127 $(VALGRIND_COMMAND) tests/atomsmasher
129 valgrind-sasl: tests/sasl
130 @$(VALGRIND_COMMAND) tests/sasl
132 valgrind-hash: tests/testhashkit
133 @$(VALGRIND_COMMAND) tests/testhashkit
135 valgrind-hashplus: tests/hash_plus
136 @$(VALGRIND_COMMAND) tests/hash_plus
138 helgrind-cycle: tests/cycle
139 @$(HELGRIND_COMMAND) tests/cycle
141 helgrind-mem: tests/libmemcached-1.0/testapp
142 @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
144 helgrind-atom: tests/atomsmasher
145 @$(HELGRIND_COMMAND) tests/atomsmasher
147 helgrind-hash: tests/testhashkit
148 @$(HELGRIND_COMMAND) tests/testhashkit
150 helgrind-hashplus: tests/hash_plus
151 @$(HELGRIND_COMMAND) tests/hash_plus