Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-187
[m6w6/libmemcached] / libtest / include.am
1 # vim:ft=automake
2 #
3 # included from Top Level Makefile.am
4 # All paths should be given relative to the root
5 #
6
7 LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute
8 VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
9 VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND)
10 HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
11 DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd
12 MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif
13 GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb
14 PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1
15 PAHOLE_COMMAND= $(LIBTOOL_COMMAND) --mode=execute pahole
16
17 export LIBTOOL_COMMAND
18 export VALGRIND_COMMAND
19 export HELGRIND_COMMAND
20 export DRD_COMMAND
21 export GDB_COMMAND
22
23 valgrind:
24 @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_EXEC_COMMAND)\""
25
26 gdb:
27 @echo make check TESTS_ENVIRONMENT="\"$(GDB_COMMAND)\""
28
29 helgrind:
30 @echo make check TESTS_ENVIRONMENT="\"$(HELGRIND_COMMAND)\""
31
32 drd:
33 @echo make check TESTS_ENVIRONMENT="\"$(DRD_COMMAND)\""
34
35 EXTRA_DIST+= libtest/run.gdb
36 EXTRA_DIST+= libtest/version.h
37
38 BUILT_SOURCES+= libtest/version.h
39
40 .PHONY: clean-libtest-check
41 clean-libtest-check:
42 -rm -rf tmp_chroot
43
44 noinst_HEADERS+= libtest/client.hpp
45 noinst_HEADERS+= libtest/formatter.hpp
46 noinst_HEADERS+= libtest/timer.hpp
47 noinst_HEADERS+= libtest/alarm.h
48 noinst_HEADERS+= libtest/binaries.h
49 noinst_HEADERS+= libtest/cpu.hpp
50 noinst_HEADERS+= libtest/blobslap_worker.h
51 noinst_HEADERS+= libtest/callbacks.h
52 noinst_HEADERS+= libtest/dns.hpp
53 noinst_HEADERS+= libtest/cmdline.h
54 noinst_HEADERS+= libtest/collection.h
55 noinst_HEADERS+= libtest/common.h
56 noinst_HEADERS+= libtest/comparison.hpp
57 noinst_HEADERS+= libtest/core.h
58 noinst_HEADERS+= libtest/dream.h
59 noinst_HEADERS+= libtest/error.h
60 noinst_HEADERS+= libtest/failed.h
61 noinst_HEADERS+= libtest/fatal.hpp
62 noinst_HEADERS+= libtest/framework.h
63 noinst_HEADERS+= libtest/gearmand.h
64 noinst_HEADERS+= libtest/drizzled.h
65 noinst_HEADERS+= libtest/get.h
66 noinst_HEADERS+= libtest/has.hpp
67 noinst_HEADERS+= libtest/http.hpp
68 noinst_HEADERS+= libtest/is_pid.hpp
69 noinst_HEADERS+= libtest/is_local.hpp
70 noinst_HEADERS+= libtest/killpid.h
71 noinst_HEADERS+= libtest/libtool.hpp
72 noinst_HEADERS+= libtest/memcached.h
73 noinst_HEADERS+= libtest/memcached.hpp
74 noinst_HEADERS+= libtest/poll_error.hpp
75 noinst_HEADERS+= libtest/port.h
76 noinst_HEADERS+= libtest/result.hpp
77 noinst_HEADERS+= libtest/result/base.hpp
78 noinst_HEADERS+= libtest/result/fail.hpp
79 noinst_HEADERS+= libtest/result/fatal.hpp
80 noinst_HEADERS+= libtest/result/skip.hpp
81 noinst_HEADERS+= libtest/result/success.hpp
82 noinst_HEADERS+= libtest/runner.h
83 noinst_HEADERS+= libtest/server.h
84 noinst_HEADERS+= libtest/server_container.h
85 noinst_HEADERS+= libtest/signal.h
86 noinst_HEADERS+= libtest/socket.hpp
87 noinst_HEADERS+= libtest/stream.h
88 noinst_HEADERS+= libtest/strerror.h
89 noinst_HEADERS+= libtest/string.hpp
90 noinst_HEADERS+= libtest/test.h
91 noinst_HEADERS+= libtest/test.hpp
92 noinst_HEADERS+= libtest/thread.hpp
93 noinst_HEADERS+= libtest/tmpfile.hpp
94 noinst_HEADERS+= libtest/lite.h
95 noinst_HEADERS+= libtest/vchar.hpp
96 noinst_HEADERS+= libtest/version.h
97 noinst_HEADERS+= libtest/visibility.h
98 noinst_HEADERS+= libtest/wait.h
99 noinst_HEADERS+= libtest/yatl.h
100
101 noinst_LTLIBRARIES+= libtest/libtest.la
102
103 libtest_libtest_la_CXXFLAGS=
104 EXTRA_libtest_libtest_la_DEPENDENCIES=
105 libtest_libtest_la_LIBADD=
106 libtest_libtest_la_SOURCES=
107
108 libtest_libtest_la_SOURCES+= libtest/alarm.cc
109 libtest_libtest_la_SOURCES+= libtest/binaries.cc
110 libtest_libtest_la_SOURCES+= libtest/cmdline.cc
111 libtest_libtest_la_SOURCES+= libtest/collection.cc
112 libtest_libtest_la_SOURCES+= libtest/comparison.cc
113 libtest_libtest_la_SOURCES+= libtest/core.cc
114 libtest_libtest_la_SOURCES+= libtest/cpu.cc
115 libtest_libtest_la_SOURCES+= libtest/dns.cc
116 libtest_libtest_la_SOURCES+= libtest/dream.cc
117 libtest_libtest_la_SOURCES+= libtest/drizzled.cc
118 libtest_libtest_la_SOURCES+= libtest/fatal.cc
119 libtest_libtest_la_SOURCES+= libtest/formatter.cc
120 libtest_libtest_la_SOURCES+= libtest/client.cc
121 libtest_libtest_la_SOURCES+= libtest/framework.cc
122 libtest_libtest_la_SOURCES+= libtest/has.cc
123 libtest_libtest_la_SOURCES+= libtest/http.cc
124 libtest_libtest_la_SOURCES+= libtest/is_local.cc
125 libtest_libtest_la_SOURCES+= libtest/killpid.cc
126 libtest_libtest_la_SOURCES+= libtest/libtool.cc
127 libtest_libtest_la_SOURCES+= libtest/main.cc
128 libtest_libtest_la_SOURCES+= libtest/port.cc
129 libtest_libtest_la_SOURCES+= libtest/result.cc
130 libtest_libtest_la_SOURCES+= libtest/runner.cc
131 libtest_libtest_la_SOURCES+= libtest/server.cc
132 libtest_libtest_la_SOURCES+= libtest/server_container.cc
133 libtest_libtest_la_SOURCES+= libtest/signal.cc
134 libtest_libtest_la_SOURCES+= libtest/socket.cc
135 libtest_libtest_la_SOURCES+= libtest/strerror.cc
136 libtest_libtest_la_SOURCES+= libtest/timer.cc
137 libtest_libtest_la_SOURCES+= libtest/tmpfile.cc
138 libtest_libtest_la_SOURCES+= libtest/vchar.cc
139
140 libtest_libtest_la_CXXFLAGS+= -DBUILDING_LIBTEST
141 libtest_libtest_la_CXXFLAGS+= @PTHREAD_CFLAGS@
142 libtest_libtest_la_CXXFLAGS+= -DLIBTEST_TEMP="\"tmp_chroot\""
143 libtest_libtest_la_CXXFLAGS+= $(CURL_CFLAGS)
144
145 libtest_libtest_la_LIBADD+= @PTHREAD_LIBS@
146 libtest_libtest_la_LIBADD+= $(CURL_LIBS)
147 libtest_libtest_la_LIBADD+= @RT_LIB@
148
149 EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest_tmp_dir
150 EXTRA_libtest_libtest_la_DEPENDENCIES+=libtest/abort
151 EXTRA_libtest_libtest_la_DEPENDENCIES+=libtest/wait
152
153 # Declare unittest so that we can append to it
154 libtest_unittest_CXXFLAGS=
155 libtest_unittest_LDADD=
156
157 # We are either building in tree, or with
158 libtest_libtest_la_SOURCES+= libtest/memcached.cc
159
160 if HAVE_LIBDRIZZLE
161
162 libtest_libtest_la_LIBADD+= $(libdrizzle_LIBS)
163 libtest_libtest_la_CXXFLAGS+= $(libdrizzle_CFLAGS)
164
165 endif
166
167 libtest_libtest_la_SOURCES+= libtest/gearmand.cc
168
169 if BUILDING_GEARMAN
170 libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc
171 endif
172
173 TMP_DIR := tmp_chroot/etc tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle
174
175 .PHONY: libtest_tmp_dir
176 libtest_tmp_dir: | $(TMP_DIR)
177
178 $(TMP_DIR):
179 @$(mkdir_p) $(TMP_DIR)
180
181 libtest_unittest_LDADD+= libtest/libtest.la
182 libtest_unittest_SOURCES= libtest/unittest.cc
183 check_PROGRAMS+= libtest/unittest
184 noinst_PROGRAMS+= libtest/unittest
185 test-unittest: libtest/unittest
186 @libtest/unittest
187
188 valgrind-unittest: libtest/unittest
189 @$(VALGRIND_COMMAND) libtest/unittest
190
191 gdb-unittest: libtest/unittest
192 @$(GDB_COMMAND) libtest/unittest
193
194 helgrind-unittest: libtest/unittest
195 @$(HELGRIND_COMMAND) libtest/unittest
196
197 drd-unittest: libtest/unittest
198 @$(DRD_COMMAND) libtest/unittest
199
200 libtest_skiptest_LDADD= libtest/libtest.la
201 libtest_skiptest_SOURCES= libtest/skiptest.cc
202 check_PROGRAMS+= libtest/skiptest
203 noinst_PROGRAMS+= libtest/skiptest
204
205 libtest_wait_SOURCES=
206 libtest_wait_SOURCES+= libtest/wait.cc
207 libtest_wait_SOURCES+= libtest/dream.cc
208 noinst_PROGRAMS+= libtest/wait
209
210 libtest_core_count_SOURCES=
211 libtest_core_count_SOURCES+= libtest/cpu.cc
212 libtest_core_count_SOURCES+= libtest/core_count.cc
213 noinst_PROGRAMS+= libtest/core-count
214
215 libtest_abort_SOURCES= libtest/abort.cc
216 noinst_PROGRAMS+= libtest/abort
217
218 libtest_backtrace_SOURCES=
219 libtest_backtrace_LDADD=
220 libtest_backtrace_SOURCES+= libtest/backtrace_test.cc
221 libtest_backtrace_SOURCES+= libmemcached/backtrace.cc
222 libtest_backtrace_LDADD+= @DL_LIB@
223 noinst_PROGRAMS+= libtest/backtrace
224 test-backtrace: libtest/backtrace
225 @libtest/backtrace
226
227 gdb-backtrace: libtest/backtrace
228 @$(GDB_COMMAND) libtest/backtrace
229