~d-ci/libmemcached/pushtest

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# vim:ft=automake
#
# included from Top Level Makefile.am
# All paths should be given relative to the root
#

LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute
VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
VALGRIND_COMMAND= LOG_COMPILER="valgrind" $(VALGRIND_EXEC_COMMAND)
HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1
SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif
GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb
PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1
PAHOLE_COMMAND= $(LIBTOOL_COMMAND) --mode=execute pahole
VALGRIND_SUPRESSION= $(LIBTOOL_COMMAND) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=minimalraw.log

export LIBTOOL_COMMAND
export VALGRIND_COMMAND
export HELGRIND_COMMAND
export DRD_COMMAND
export SGCHECK_COMMAND
export GDB_COMMAND

valgrind:
	@echo make check LOG_COMPILER="\"$(VALGRIND_EXEC_COMMAND)\""

sgcheck:
	@echo make check LOG_COMPILER="\"$(SGCHECK_EXEC_COMMAND)\""

valgrind-supressions:
	@echo make check LOG_COMPILER="\"$(VALGRIND_SUPRESSION)\""

gdb:
	@echo make check LOG_COMPILER="\"$(GDB_COMMAND)\""

helgrind:
	@echo make check LOG_COMPILER="\"$(HELGRIND_COMMAND)\""

drd:
	@echo make check LOG_COMPILER="\"$(DRD_COMMAND)\""

EXTRA_DIST+= libtest/run.gdb
EXTRA_DIST+= libtest/version.h

BUILT_SOURCES+= libtest/version.h

.PHONY: clean-libtest-check
clean-libtest-check:
	-rm -rf tmp_chroot

noinst_HEADERS+= libtest/client.hpp
noinst_HEADERS+= libtest/formatter.hpp
noinst_HEADERS+= libtest/timer.hpp
noinst_HEADERS+= libtest/alarm.h
noinst_HEADERS+= libtest/binaries.h
noinst_HEADERS+= libtest/cpu.hpp
noinst_HEADERS+= libtest/blobslap_worker.h
noinst_HEADERS+= libtest/callbacks.h
noinst_HEADERS+= libtest/dns.hpp
noinst_HEADERS+= libtest/cmdline.h
noinst_HEADERS+= libtest/collection.h
noinst_HEADERS+= libtest/common.h
noinst_HEADERS+= libtest/comparison.hpp
noinst_HEADERS+= libtest/core.h
noinst_HEADERS+= libtest/dream.h
noinst_HEADERS+= libtest/error.h
noinst_HEADERS+= libtest/exception.hpp
noinst_HEADERS+= libtest/exception/disconnected.hpp
noinst_HEADERS+= libtest/exception/fatal.hpp
noinst_HEADERS+= libtest/framework.h
noinst_HEADERS+= libtest/gearmand.h
noinst_HEADERS+= libtest/drizzled.h
noinst_HEADERS+= libtest/get.h
noinst_HEADERS+= libtest/has.hpp
noinst_HEADERS+= libtest/http.hpp
noinst_HEADERS+= libtest/is_pid.hpp
noinst_HEADERS+= libtest/is_local.hpp
noinst_HEADERS+= libtest/killpid.h
noinst_HEADERS+= libtest/libtool.hpp
noinst_HEADERS+= libtest/memcached.h
noinst_HEADERS+= libtest/memcached.hpp
noinst_HEADERS+= libtest/poll_error.hpp
noinst_HEADERS+= libtest/port.h
noinst_HEADERS+= libtest/result.hpp
noinst_HEADERS+= libtest/result/base.hpp
noinst_HEADERS+= libtest/result/fail.hpp
noinst_HEADERS+= libtest/result/skip.hpp
noinst_HEADERS+= libtest/result/success.hpp
noinst_HEADERS+= libtest/runner.h
noinst_HEADERS+= libtest/server.h
noinst_HEADERS+= libtest/server_container.h
noinst_HEADERS+= libtest/signal.h
noinst_HEADERS+= libtest/socket.hpp
noinst_HEADERS+= libtest/stream.h
noinst_HEADERS+= libtest/strerror.h
noinst_HEADERS+= libtest/string.hpp
noinst_HEADERS+= libtest/test.h
noinst_HEADERS+= libtest/test.hpp
noinst_HEADERS+= libtest/thread.hpp
noinst_HEADERS+= libtest/tmpfile.hpp
noinst_HEADERS+= libtest/lite.h
noinst_HEADERS+= libtest/valgrind.h
noinst_HEADERS+= libtest/vchar.hpp
noinst_HEADERS+= libtest/version.h
noinst_HEADERS+= libtest/visibility.h
noinst_HEADERS+= libtest/wait.h
noinst_HEADERS+= libtest/yatl.h

check_LTLIBRARIES+= libtest/libtest.la

libtest_libtest_la_CXXFLAGS=
EXTRA_libtest_libtest_la_DEPENDENCIES=
libtest_libtest_la_LIBADD=
libtest_libtest_la_SOURCES=
libtest_libtest_la_CXXFLAGS+= @LIBMEMCACHED_CFLAGS@
libtest_libtest_la_LIBADD+= @LIBMEMCACHED_LIB@
libtest_libtest_la_LIBADD+= @CYASSL_LIB@

libtest_libtest_la_SOURCES+= libtest/alarm.cc
libtest_libtest_la_SOURCES+= libtest/binaries.cc
libtest_libtest_la_SOURCES+= libtest/cmdline.cc
libtest_libtest_la_SOURCES+= libtest/collection.cc
libtest_libtest_la_SOURCES+= libtest/comparison.cc
libtest_libtest_la_SOURCES+= libtest/core.cc
libtest_libtest_la_SOURCES+= libtest/cpu.cc
libtest_libtest_la_SOURCES+= libtest/dns.cc
libtest_libtest_la_SOURCES+= libtest/dream.cc
libtest_libtest_la_SOURCES+= libtest/drizzled.cc
libtest_libtest_la_SOURCES+= libtest/exception.cc
libtest_libtest_la_SOURCES+= libtest/exception/fatal.cc
libtest_libtest_la_SOURCES+= libtest/formatter.cc
libtest_libtest_la_SOURCES+= libtest/client.cc
libtest_libtest_la_SOURCES+= libtest/framework.cc
libtest_libtest_la_SOURCES+= libtest/has.cc
libtest_libtest_la_SOURCES+= libtest/http.cc
libtest_libtest_la_SOURCES+= libtest/is_local.cc
libtest_libtest_la_SOURCES+= libtest/killpid.cc
libtest_libtest_la_SOURCES+= libtest/libtool.cc
libtest_libtest_la_SOURCES+= libtest/main.cc
libtest_libtest_la_SOURCES+= libtest/port.cc
libtest_libtest_la_SOURCES+= libtest/result.cc
libtest_libtest_la_SOURCES+= libtest/runner.cc
libtest_libtest_la_SOURCES+= libtest/server.cc
libtest_libtest_la_SOURCES+= libtest/server_container.cc
libtest_libtest_la_SOURCES+= libtest/signal.cc
libtest_libtest_la_SOURCES+= libtest/socket.cc
libtest_libtest_la_SOURCES+= libtest/strerror.cc
libtest_libtest_la_SOURCES+= libtest/timer.cc
libtest_libtest_la_SOURCES+= libtest/tmpfile.cc
libtest_libtest_la_SOURCES+= libtest/vchar.cc

libtest_libtest_la_CXXFLAGS+= -DBUILDING_LIBTEST
libtest_libtest_la_CXXFLAGS+= @PTHREAD_CFLAGS@
libtest_libtest_la_CXXFLAGS+= -DLIBTEST_TEMP="\"tmp_chroot\""
libtest_libtest_la_CXXFLAGS+= $(CURL_CFLAGS)

libtest_libtest_la_LIBADD+= @PTHREAD_LIBS@
libtest_libtest_la_LIBADD+= $(CURL_LIBS)
libtest_libtest_la_LIBADD+= @RT_LIB@

EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest/abort
EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest/wait

# Declare unittest so that we can append to it
libtest_unittest_CXXFLAGS=
libtest_unittest_LDADD=
libtest_libtest_la_LDFLAGS=

# We are either building in tree, or with
libtest_libtest_la_SOURCES+= libtest/memcached.cc

if HAVE_LIBDRIZZLE
libtest_libtest_la_LDFLAGS+= @LIBDRIZZLE_LDFLAGS@
libtest_libtest_la_LIBADD+= @LIBDRIZZLE_LIB@
endif

libtest_libtest_la_SOURCES+= libtest/gearmand.cc

if BUILDING_GEARMAN
libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc
endif

TMP_DIR := tmp_chroot/etc tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle

BUILT_SOURCES+= $(TMP_DIR)

$(TMP_DIR):
	@$(mkdir_p) $(TMP_DIR)

libtest_unittest_LDADD+= libtest/libtest.la
libtest_unittest_SOURCES= libtest/unittest.cc
check_PROGRAMS+= libtest/unittest
noinst_PROGRAMS+= libtest/unittest
test-unittest: libtest/unittest
	@libtest/unittest

valgrind-unittest: libtest/unittest
	@$(VALGRIND_COMMAND) libtest/unittest

gdb-unittest: libtest/unittest
	@$(GDB_COMMAND) libtest/unittest

helgrind-unittest: libtest/unittest
	@$(HELGRIND_COMMAND) libtest/unittest

drd-unittest: libtest/unittest
	@$(DRD_COMMAND) libtest/unittest

sgcheck-unittest: libtest/unittest
	echo $(SGCHECK_COMMAND)
	@$(SGCHECK_COMMAND) libtest/unittest

libtest_skiptest_LDADD= libtest/libtest.la
libtest_skiptest_SOURCES= libtest/skiptest.cc
check_PROGRAMS+= libtest/skiptest
noinst_PROGRAMS+= libtest/skiptest

test-skiptest: libtest/skiptest
	@libtest/skiptest

valgrind-skiptest: libtest/skiptest
	@$(VALGRIND_COMMAND) libtest/skiptest

helgrind-skiptest: libtest/skiptest
	@$(HELGRIND_COMMAND) libtest/skiptest

drd-skiptest: libtest/skiptest
	@$(DRD_COMMAND) libtest/skiptest

libtest_wait_SOURCES=
libtest_wait_SOURCES+= libtest/wait.cc
libtest_wait_SOURCES+= libtest/dream.cc
noinst_PROGRAMS+= libtest/wait

libtest_core_count_SOURCES=
libtest_core_count_SOURCES+= libtest/cpu.cc
libtest_core_count_SOURCES+= libtest/core_count.cc
noinst_PROGRAMS+= libtest/core-count

libtest_abort_SOURCES= libtest/abort.cc
noinst_PROGRAMS+= libtest/abort

libtest_backtrace_SOURCES=
libtest_backtrace_LDADD=
libtest_backtrace_SOURCES+= libtest/backtrace_test.cc
libtest_backtrace_SOURCES+= libmemcached/backtrace.cc
libtest_backtrace_LDADD+= @lt_cv_dlopen_libs@
noinst_PROGRAMS+= libtest/backtrace
test-backtrace: libtest/backtrace
	@libtest/backtrace

gdb-backtrace: libtest/backtrace
	@$(GDB_COMMAND) libtest/backtrace