]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/memcheck/tests/Makefile.am
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / memcheck / tests / Makefile.am
1
2 include $(top_srcdir)/Makefile.tool-tests.am
3
4 SUBDIRS = .
5
6 # Arch-specific tests.
7 if VGCONF_ARCHS_INCLUDE_X86
8 SUBDIRS += x86
9 endif
10 if VGCONF_ARCHS_INCLUDE_AMD64
11 SUBDIRS += amd64
12 endif
13
14 # OS-specific tests
15 if VGCONF_OS_IS_LINUX
16 SUBDIRS += linux
17 endif
18 if VGCONF_OS_IS_DARWIN
19 SUBDIRS += darwin
20 endif
21
22 # Platform-specific tests
23 if VGCONF_PLATFORMS_INCLUDE_X86_LINUX
24 SUBDIRS += x86-linux
25 endif
26 if VGCONF_PLATFORMS_INCLUDE_AMD64_LINUX
27 SUBDIRS += amd64-linux
28 endif
29
30 DIST_SUBDIRS = x86 amd64 linux darwin x86-linux amd64-linux .
31
32 dist_noinst_SCRIPTS = \
33         filter_addressable \
34         filter_allocs \
35         filter_leak_cases_possible \
36         filter_stderr filter_xml \
37         filter_varinfo3
38
39 noinst_HEADERS = leak.h
40
41 EXTRA_DIST = \
42         addressable.stderr.exp addressable.stdout.exp addressable.vgtest \
43         atomic_incs.stderr.exp atomic_incs.vgtest \
44         atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \
45         badaddrvalue.stderr.exp \
46         badaddrvalue.stdout.exp badaddrvalue.vgtest \
47         badfree-2trace.stderr.exp badfree-2trace.vgtest \
48         badfree.stderr.exp badfree.vgtest \
49         badjump.stderr.exp badjump.vgtest \
50         badjump2.stderr.exp badjump2.vgtest \
51         badloop.stderr.exp badloop.vgtest \
52         badpoll.stderr.exp badpoll.vgtest \
53         badrw.stderr.exp badrw.vgtest \
54         brk2.stderr.exp brk2.vgtest \
55         buflen_check.stderr.exp buflen_check.vgtest \
56         calloc-overflow.stderr.exp calloc-overflow.vgtest\
57         clientperm.stderr.exp \
58         clientperm.stdout.exp clientperm.vgtest \
59         custom_alloc.stderr.exp custom_alloc.vgtest \
60         custom-overlap.stderr.exp custom-overlap.vgtest \
61         deep_templates.vgtest \
62         deep_templates.stdout.exp deep_templates.stderr.exp \
63         describe-block.stderr.exp describe-block.vgtest \
64         doublefree.stderr.exp doublefree.vgtest \
65         erringfds.stderr.exp erringfds.stdout.exp erringfds.vgtest \
66         error_counts.stderr.exp error_counts.vgtest \
67         errs1.stderr.exp errs1.vgtest \
68         exitprog.stderr.exp exitprog.vgtest \
69         execve.stderr.exp execve.vgtest \
70         execve2.stderr.exp execve2.vgtest \
71         file_locking.stderr.exp file_locking.vgtest \
72         fprw.stderr.exp fprw.vgtest \
73         fwrite.stderr.exp fwrite.vgtest \
74         inits.stderr.exp inits.vgtest \
75         inline.stderr.exp inline.stdout.exp inline.vgtest \
76         leak-0.vgtest leak-0.stderr.exp \
77         leak-cases-full.vgtest leak-cases-full.stderr.exp \
78         leak-cases-possible.vgtest leak-cases-possible.stderr.exp \
79         leak-cases-summary.vgtest leak-cases-summary.stderr.exp \
80         leak-cycle.vgtest leak-cycle.stderr.exp \
81         leak-pool-0.vgtest leak-pool-0.stderr.exp \
82         leak-pool-1.vgtest leak-pool-1.stderr.exp \
83         leak-pool-2.vgtest leak-pool-2.stderr.exp \
84         leak-pool-3.vgtest leak-pool-3.stderr.exp \
85         leak-pool-4.vgtest leak-pool-4.stderr.exp \
86         leak-pool-5.vgtest leak-pool-5.stderr.exp \
87         leak-tree.vgtest leak-tree.stderr.exp \
88         linux-syslog-syscall linux-syslog-syscall.stderr.exp \
89         linux-syscalls-2007 linux-syscalls-2007.stderr.exp \
90         long_namespace_xml.vgtest long_namespace_xml.stdout.exp \
91         long_namespace_xml.stderr.exp \
92         long-supps.vgtest long-supps.stderr.exp long-supps.supp \
93         mallinfo.stderr.exp mallinfo.vgtest \
94         malloc_free_fill.vgtest \
95         malloc_free_fill.stderr.exp \
96         malloc_usable.stderr.exp malloc_usable.vgtest \
97         malloc1.stderr.exp malloc1.vgtest \
98         malloc2.stderr.exp malloc2.vgtest \
99         malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \
100         manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \
101         manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp manuel2.vgtest \
102         manuel3.stderr.exp manuel3.vgtest \
103         match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \
104         memalign_test.stderr.exp memalign_test.vgtest \
105         memalign2.stderr.exp memalign2.vgtest \
106         memcmptest.stderr.exp memcmptest.stderr.exp2 \
107         memcmptest.stdout.exp memcmptest.vgtest \
108         mempool.stderr.exp mempool.vgtest \
109         metadata.stderr.exp metadata.stdout.exp metadata.vgtest \
110         mismatches.stderr.exp mismatches.vgtest \
111         mmaptest.stderr.exp mmaptest.vgtest \
112         nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \
113         nanoleak2.stderr.exp nanoleak2.vgtest \
114         new_nothrow.stderr.exp new_nothrow.vgtest \
115         new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
116         noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \
117         null_socket.stderr.exp null_socket.vgtest \
118         origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \
119         origin2-not-quite.vgtest origin2-not-quite.stdout.exp \
120         origin2-not-quite.stderr.exp \
121         origin3-no.vgtest origin3-no.stdout.exp \
122         origin3-no.stderr.exp \
123         origin4-many.vgtest origin4-many.stdout.exp \
124         origin4-many.stderr.exp \
125         origin5-bz2.vgtest origin5-bz2.stdout.exp \
126         origin5-bz2.stderr.exp-glibc25-x86 \
127         origin5-bz2.stderr.exp-glibc25-amd64 \
128         origin5-bz2.stderr.exp-glibc27-ppc64 \
129         origin6-fp.vgtest origin6-fp.stdout.exp \
130         origin6-fp.stderr.exp-glibc25-amd64 \
131         origin6-fp.stderr.exp-glibc27-ppc64 \
132         overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
133         partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \
134         partiallydefinedeq.stderr.exp2 \
135         partiallydefinedeq.stdout.exp \
136         partial_load_ok.vgtest partial_load_ok.stderr.exp partial_load_ok.stderr.exp64 \
137         partial_load_dflt.vgtest partial_load_dflt.stderr.exp partial_load_dflt.stderr.exp64 \
138         pdb-realloc.stderr.exp pdb-realloc.vgtest \
139         pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \
140         pipe.stderr.exp pipe.vgtest \
141         pointer-trace.vgtest \
142         pointer-trace.stderr.exp \
143         post-syscall.stderr.exp post-syscall.vgtest \
144         realloc1.stderr.exp realloc1.vgtest \
145         realloc2.stderr.exp realloc2.vgtest \
146         realloc3.stderr.exp realloc3.vgtest \
147         sh-mem.stderr.exp sh-mem.vgtest \
148         sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \
149         sh-mem-random.stdout.exp sh-mem-random.vgtest \
150         sigaltstack.stderr.exp sigaltstack.vgtest \
151         sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.vgtest \
152         signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
153         sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
154         strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp-darwin \
155             strchr.vgtest \
156         str_tester.stderr.exp str_tester.vgtest \
157         supp-dir.vgtest supp-dir.stderr.exp \
158         supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \
159         supp1.stderr.exp supp1.vgtest \
160         supp2.stderr.exp supp2.vgtest \
161         supp.supp \
162         suppfree.stderr.exp suppfree.vgtest \
163         trivialleak.stderr.exp trivialleak.vgtest \
164         unit_libcbase.stderr.exp unit_libcbase.vgtest \
165         unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \
166         varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp \
167         varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp \
168         varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp \
169         varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp \
170         varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp \
171         varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp \
172         vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \
173         vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \
174         vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \
175         vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \
176         wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \
177         wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \
178         wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \
179         wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \
180         wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \
181         wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \
182         wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \
183         wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \
184         wrap8.stdout.exp2 wrap8.stderr.exp2 \
185         writev.stderr.exp writev.vgtest \
186         xml1.stderr.exp xml1.stdout.exp xml1.vgtest
187
188 check_PROGRAMS = \
189         addressable \
190         atomic_incs \
191         badaddrvalue badfree badjump badjump2 \
192         badloop \
193         badpoll \
194         badrw \
195         brk2 \
196         buflen_check \
197         calloc-overflow \
198         clientperm \
199         custom_alloc \
200         custom-overlap \
201         deep_templates \
202         describe-block \
203         doublefree error_counts errs1 exitprog execve execve2 erringfds \
204         file_locking \
205         fprw fwrite inits inline \
206         leak-0 \
207         leak-cases \
208         leak-cycle \
209         leak-pool \
210         leak-tree \
211         linux-syslog-syscall \
212         linux-syscalls-2007 \
213         long_namespace_xml \
214         long-supps \
215         mallinfo \
216         malloc_free_fill \
217         malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \
218         match-overrun \
219         memalign_test memalign2 memcmptest mempool mmaptest \
220         mismatches new_override metadata \
221         nanoleak_supp nanoleak2 new_nothrow \
222         noisy_child \
223         null_socket \
224         origin1-yes origin2-not-quite origin3-no \
225         origin4-many origin5-bz2 origin6-fp \
226         overlap \
227         partiallydefinedeq \
228         partial_load pdb-realloc pdb-realloc2 \
229         pipe pointer-trace \
230         post-syscall \
231         realloc1 realloc2 realloc3 \
232         sh-mem sh-mem-random \
233         sigaltstack signal2 sigprocmask sigkill \
234         strchr \
235         str_tester \
236         supp_unknown supp1 supp2 suppfree \
237         trivialleak \
238         unit_libcbase unit_oset \
239         varinfo1 varinfo2 varinfo3 varinfo4 \
240         varinfo5 varinfo5so.so varinfo6 \
241         vcpu_fbench vcpu_fnfns \
242         xml1 \
243         wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
244         writev
245
246
247 AM_CFLAGS   += $(AM_FLAG_M3264_PRI)
248 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
249
250 if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
251 AM_CFLAGS   += -mfloat-abi=softfp
252 AM_CXXFLAGS += -mfloat-abi=softfp
253 endif
254
255 if VGCONF_OS_IS_DARWIN
256 atomic_incs_CFLAGS = $(AM_CFLAGS) -mdynamic-no-pic
257 else
258 atomic_incs_CFLAGS = $(AM_CFLAGS)
259 endif
260
261 deep_templates_SOURCES  = deep_templates.cpp
262 deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
263
264 error_counts_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
265
266 inits_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
267
268 long_namespace_xml_SOURCES = long_namespace_xml.cpp
269
270 manuel1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
271
272 memcmptest_CFLAGS       = $(AM_CFLAGS) -fno-builtin-memcmp
273
274 mismatches_SOURCES      = mismatches.cpp
275
276 new_nothrow_SOURCES     = new_nothrow.cpp
277 new_override_SOURCES    = new_override.cpp
278
279 origin2_not_quite_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
280
281 origin3_no_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
282
283 # This requires optimisation in order to get just one resulting error.
284 origin4_many_CFLAGS     = $(AM_CFLAGS) -O
285
286 # Apply -O so as to run in reasonable time.
287 origin5_bz2_CFLAGS      = $(AM_CFLAGS) -O -Wno-inline
288 origin6_fp_CFLAGS       = $(AM_CFLAGS) -O
289
290 # Don't allow GCC to inline memcpy(), because then we can't intercept it
291 overlap_CFLAGS          = $(AM_CFLAGS) -fno-builtin-memcpy
292
293 str_tester_CFLAGS       = $(AM_CFLAGS) -Wno-shadow
294
295 supp_unknown_SOURCES    = badjump.c
296 supp1_SOURCES           = supp.c
297 supp2_SOURCES           = supp.c
298
299 vcpu_bz2_CFLAGS         = $(AM_CFLAGS) -O2
300 vcpu_fbench_CFLAGS      = $(AM_CFLAGS) -O2
301 vcpu_fnfns_CFLAGS       = $(AM_CFLAGS) -O2
302 vcpu_fnfns_LDADD        = -lm
303 wrap6_CFLAGS            = $(AM_CFLAGS) -O2
304
305 # To make it a bit more realistic, have some optimisation enabled
306 # for the varinfo tests.  We still expect sane results.
307 varinfo1_CFLAGS         = $(AM_CFLAGS) -O
308 varinfo2_CFLAGS         = $(AM_CFLAGS) -O -Wno-shadow
309 varinfo3_CFLAGS         = $(AM_CFLAGS) -O
310 varinfo4_CFLAGS         = $(AM_CFLAGS) -O
311 varinfo5_CFLAGS         = $(AM_CFLAGS) -O
312 varinfo6_CFLAGS         = $(AM_CFLAGS) -O
313
314 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
315 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
316 else
317  # persuade the AIX linker not to junk apparently unused
318  # function descriptors.  Unfortunately -Wl,-G -Wl,-bnogc
319  # produces a link error on 64-bit AIX, hence only 32-bit
320  # gets these flags.
321  wrap1_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
322  wrap2_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
323  wrap3_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
324  wrap4_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
325  wrap5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
326  wrap6_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
327  wrap8_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
328 endif
329 endif
330
331 # Build shared object for varinfo5
332 varinfo5_SOURCES        = varinfo5.c
333 varinfo5_DEPENDENCIES   = varinfo5so.so
334 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 
335  varinfo5_LDADD         = `pwd`/varinfo5so.so
336  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI)
337 else
338 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
339  varinfo5_LDADD         = `pwd`/varinfo5so.so
340  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
341 else
342 if VGCONF_OS_IS_DARWIN
343  varinfo5_LDADD         = `pwd`/varinfo5so.so
344  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI)
345 else
346  varinfo5_LDADD         = varinfo5so.so
347  varinfo5_LDFLAGS       = $(AM_FLAG_M3264_PRI) \
348                                 -Wl,-rpath,$(top_builddir)/memcheck/tests
349 endif
350 endif
351
352 varinfo5so_so_SOURCES   = varinfo5so.c
353 varinfo5so_so_CFLAGS    = $(AM_CFLAGS) -fpic -O -Wno-shadow
354 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
355  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared
356 else
357 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
358  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared \
359                                 -Wl,-G -Wl,-bnogc
360 else
361 if VGCONF_OS_IS_DARWIN
362  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
363                                 -dynamiclib -all_load
364 else
365  varinfo5so_so_LDFLAGS  = -fpic $(AM_FLAG_M3264_PRI) -shared \
366                                 -Wl,-soname -Wl,varinfo5so.so
367 endif
368 endif
369 endif
370
371 # Build shared object for wrap7
372 wrap7_SOURCES           = wrap7.c
373 wrap7_DEPENDENCIES      = wrap7so.so
374 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5 
375  wrap7_LDADD            = `pwd`/wrap7so.so
376  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI)
377 else
378 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
379  wrap7_LDADD            = `pwd`/wrap7so.so
380  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
381 else
382 if VGCONF_OS_IS_DARWIN
383  wrap7_LDADD            = `pwd`/wrap7so.so
384  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI)
385 else
386  wrap7_LDADD            = wrap7so.so
387  wrap7_LDFLAGS          = $(AM_FLAG_M3264_PRI) \
388                                 -Wl,-rpath,$(top_builddir)/memcheck/tests
389 endif
390 endif
391 endif
392
393 wrap7so_so_SOURCES      = wrap7so.c
394 wrap7so_so_CFLAGS       = $(AM_CFLAGS) -fpic
395 if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
396  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared
397 else
398 if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
399  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared \
400                                 -Wl,-G -Wl,-bnogc
401 else
402 if VGCONF_OS_IS_DARWIN
403  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
404                                 -dynamiclib -all_load
405 else
406  wrap7so_so_LDFLAGS     = -fpic $(AM_FLAG_M3264_PRI) -shared \
407                                 -Wl,-soname -Wl,wrap7so.so
408 endif
409 endif
410 endif
411
412 endif
413