Merge
[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 EXTRA_DIST+= tests/output_plus.res
22
23 noinst_HEADERS+= tests/exist.h
24 noinst_HEADERS+= tests/keys.hpp
25 noinst_HEADERS+= tests/hash_results.h
26 noinst_HEADERS+= tests/libmemcached_world.h
27 noinst_HEADERS+= tests/libmemcached_world_socket.h
28
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
39
40 include tests/libmemcached-1.0/include.am
41
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
48
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
54
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
61
62 include tests/cli.am
63
64 test: check
65
66 check-local: $(TEST_DOCS)
67 @echo "Tests completed"
68
69 test-mem: tests/libmemcached-1.0/testapp
70 @tests/libmemcached-1.0/testapp
71
72 test-sasl: tests/sasl
73 @tests/sasl
74
75 test-atom: tests/atomsmasher
76 @tests/atomsmasher
77
78 test-plus: tests/testplus
79 @tests/testplus
80
81 test-hash: tests/testhashkit
82 @tests/testhashkit
83
84 test-hashplus: tests/hash_plus
85 @tests/hash_plus
86
87 test-cycle: tests/cycle
88 @tests/cycle
89
90 test-memcapable: tests/memcapable
91 @tests/memcapable
92
93 pahole-mem: tests/testapp
94 @$(PAHOLE_COMMAND) tests/testapp
95
96 gdb-mem: tests/libmemcached-1.0/testapp
97 @$(DEBUG_COMMAND) tests/libmemcached-1.0/testapp
98
99 gdb-sasl: tests/sasl
100 @$(DEBUG_COMMAND) tests/sasl
101
102 gdb-atom: tests/atomsmasher
103 @$(DEBUG_COMMAND) tests/atomsmasher
104
105 gdb-plus: tests/testplus
106 $(DEBUG_COMMAND) tests/testplus
107
108 gdb-hash: tests/testhashkit
109 @$(DEBUG_COMMAND) tests/testhashkit
110
111 gdb-hashplus: tests/hash_plus
112 @$(DEBUG_COMMAND) tests/hash_plus
113
114 gdb-cycle: tests/cycle
115 @$(DEBUG_COMMAND) tests/cycle
116
117 gdb-failure: tests/failure
118 @$(DEBUG_COMMAND) tests/failure
119
120 valgrind-cycle: tests/cycle
121 $(VALGRIND_COMMAND) tests/cycle
122
123 valgrind-mem: tests/libmemcached-1.0/testapp
124 @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
125
126 valgrind-failure: tests/failure
127 @$(VALGRIND_COMMAND) tests/failure
128
129 valgrind-atom: tests/atomsmasher
130 $(VALGRIND_COMMAND) tests/atomsmasher
131
132 valgrind-plus: tests/testplus
133 @$(VALGRIND_COMMAND) tests/testplus
134
135 valgrind-sasl: tests/sasl
136 @$(VALGRIND_COMMAND) tests/sasl
137
138 valgrind-hash: tests/testhashkit
139 @$(VALGRIND_COMMAND) tests/testhashkit
140
141 valgrind-hashplus: tests/hash_plus
142 @$(VALGRIND_COMMAND) tests/hash_plus
143
144 helgrind-cycle: tests/cycle
145 @$(HELGRIND_COMMAND) tests/cycle
146
147 helgrind-mem: tests/libmemcached-1.0/testapp
148 @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
149
150 helgrind-atom: tests/atomsmasher
151 @$(HELGRIND_COMMAND) tests/atomsmasher
152
153 helgrind-plus: tests/testplus
154 @$(HELGRIND_COMMAND) tests/testplus
155
156 helgrind-hash: tests/testhashkit
157 @$(HELGRIND_COMMAND) tests/testhashkit
158
159 helgrind-hashplus: tests/hash_plus
160 @$(HELGRIND_COMMAND) tests/hash_plus