2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS = \
5 compare_error_count_with \
6 filter_annotate_barrier_xml \
11 filter_stderr_and_thread_no \
12 filter_stderr_and_thread_no_and_offset \
13 filter_stderr_solaris \
15 filter_thread_name_xml \
16 filter_xml_and_thread_no \
18 supported_libpthread \
22 tsan_thread_wrappers_pthread.h \
23 unified_annotations.h \
27 annotate_barrier.stderr.exp \
28 annotate_barrier.vgtest \
29 annotate_barrier_xml.stderr.exp \
30 annotate_barrier_xml.vgtest \
31 annotate_hb_err.stderr.exp \
32 annotate_hb_err.vgtest \
33 annotate_hb_race.stderr.exp \
34 annotate_hb_race.vgtest \
35 annotate_hbefore.stderr.exp \
36 annotate_hbefore.vgtest \
37 annotate_order_1.stderr.exp \
38 annotate_order_1.vgtest \
39 annotate_order_2.stderr.exp \
40 annotate_order_2.vgtest \
41 annotate_order_3.stderr.exp \
42 annotate_order_3.vgtest \
43 annotate_publish_hg.stderr.exp \
44 annotate_publish_hg.vgtest \
45 annotate_sem.stderr.exp \
47 annotate_smart_pointer.stderr.exp \
48 annotate_smart_pointer.vgtest \
49 annotate_smart_pointer2.stderr.exp \
50 annotate_smart_pointer2.stderr.exp-darwin \
51 annotate_smart_pointer2.vgtest \
52 annotate_spinlock.stderr.exp \
53 annotate_spinlock.vgtest \
54 annotate_rwlock.stderr.exp \
55 annotate_rwlock.vgtest \
56 annotate_rwlock_hg.stderr.exp \
57 annotate_rwlock_hg.vgtest \
58 annotate_ignore_read.stderr.exp \
59 annotate_ignore_read.vgtest \
60 annotate_ignore_rw.stderr.exp \
61 annotate_ignore_rw.vgtest \
62 annotate_ignore_rw2.stderr.exp \
63 annotate_ignore_rw2.stderr.exp-solaris \
64 annotate_ignore_rw2.vgtest \
65 annotate_ignore_write.stderr.exp \
66 annotate_ignore_write.stderr.exp-solaris \
67 annotate_ignore_write.vgtest \
68 annotate_ignore_write2.stderr.exp \
69 annotate_ignore_write2.stderr.exp-solaris \
70 annotate_ignore_write2.vgtest \
71 annotate_trace_memory.stderr.exp-32bit \
72 annotate_trace_memory.stderr.exp-64bit \
73 annotate_trace_memory.stderr.exp-mips32 \
74 annotate_trace_memory.vgtest \
75 annotate_trace_memory_xml.stderr.exp-32bit \
76 annotate_trace_memory_xml.stderr.exp-64bit \
77 annotate_trace_memory_xml.stderr.exp-mips32 \
78 annotate_trace_memory_xml.vgtest \
79 annotate_sem.stderr.exp \
81 annotate_static.stderr.exp \
82 annotate_static.vgtest \
83 atomic_var.stderr.exp \
86 bug322621.stderr.exp \
88 bar_bad.stderr.exp-nohang \
89 bar_bad.stderr.exp-solaris \
91 bar_bad_xml.stderr.exp \
92 bar_bad_xml.stderr.exp-nohang \
93 bar_bad_xml.stderr.exp-solaris \
95 bar_trivial.stderr.exp \
96 bar_trivial.stdout.exp \
98 boost_thread.stderr.exp \
100 bug-235681.stderr.exp \
102 circular_buffer.stderr.exp \
103 circular_buffer.vgtest \
104 concurrent_close.stderr.exp \
105 concurrent_close.vgtest \
106 custom_alloc.stderr.exp \
107 custom_alloc.vgtest \
108 custom_alloc_fiw.stderr.exp \
109 custom_alloc_fiw.vgtest \
113 fork-serial.stderr.exp \
115 fork-parallel.stderr.exp \
116 fork-parallel.vgtest \
118 fp_race.stderr.exp-mips32-be \
119 fp_race.stderr.exp-mips32-le \
121 fp_race2.stderr.exp \
123 fp_race_xml.stderr.exp \
124 fp_race_xml.stderr.exp-mips32-be \
125 fp_race_xml.stderr.exp-mips32-le \
126 fp_race_xml.stderr.exp-solaris \
128 free_is_write.stderr.exp \
129 free_is_write.vgtest \
130 free_is_write2.stderr.exp \
131 free_is_write2.vgtest \
132 hg01_all_ok.stderr.exp \
134 hg02_deadlock.stderr.exp \
135 hg02_deadlock.vgtest \
136 hg03_inherit.stderr.exp \
137 hg03_inherit.vgtest \
138 hg04_race.stderr.exp \
140 hg05_race2.stderr.exp \
141 hg05_race2.stderr.exp-powerpc \
143 hg06_readshared.stderr.exp \
144 hg06_readshared.vgtest \
145 hold_lock_1.stderr.exp \
147 hold_lock_2.stderr.exp \
149 linuxthreads_det.stderr.exp \
150 linuxthreads_det.stderr.exp-linuxthreads \
151 linuxthreads_det.stdout.exp \
152 linuxthreads_det.stdout.exp-linuxthreads \
153 linuxthreads_det.vgtest \
154 local_static.stderr.exp \
155 local_static.vgtest \
159 memory_allocation.stderr.exp \
160 memory_allocation.vgtest \
161 monitor_example.stderr.exp \
162 monitor_example.vgtest \
163 new_delete.stderr.exp \
165 omp_matinv.stderr.exp \
166 omp_matinv.stdout.exp \
168 omp_matinv_racy.stderr.exp \
169 omp_matinv_racy.stdout.exp \
170 omp_matinv_racy.vgtest \
171 omp_prime_racy.stderr.exp \
172 omp_prime_racy.vgtest \
173 omp_printf.stderr.exp \
175 pth_barrier.stderr.exp \
177 pth_barrier2.stderr.exp \
178 pth_barrier2.vgtest \
179 pth_barrier3.stderr.exp \
180 pth_barrier3.vgtest \
181 pth_barrier_race.stderr.exp \
182 pth_barrier_race.vgtest \
183 pth_barrier_reinit.stderr.exp \
184 pth_barrier_reinit.vgtest \
185 pth_barrier_thr_cr.stderr.exp \
186 pth_barrier_thr_cr.vgtest \
187 pth_barrier_thr_cr.supp \
188 pth_broadcast.stderr.exp \
189 pth_broadcast.vgtest \
190 pth_cancel_locked.stderr.exp \
191 pth_cancel_locked.stderr.exp-darwin \
192 pth_cancel_locked.vgtest \
193 pth_cleanup_handler.stderr.exp \
194 pth_cleanup_handler.vgtest \
195 pth_cond_destroy_busy.stderr.exp \
196 pth_cond_destroy_busy.stderr.exp-solaris \
197 pth_cond_destroy_busy.vgtest \
198 pth_cond_race.stderr.exp \
199 pth_cond_race.vgtest \
200 pth_cond_race2.stderr.exp \
201 pth_cond_race2.vgtest \
202 pth_cond_race3.stderr.exp \
203 pth_cond_race3.vgtest \
204 pth_create_chain.stderr.exp \
205 pth_create_chain.vgtest \
206 pth_create_glibc_2_0.stderr.exp \
207 pth_create_glibc_2_0.vgtest \
208 pth_detached.stderr.exp \
209 pth_detached.stdout.exp \
210 pth_detached.vgtest \
211 pth_detached2.stderr.exp \
212 pth_detached2.stdout.exp \
213 pth_detached2.vgtest \
214 pth_detached3.stderr.exp1 \
215 pth_detached3.stderr.exp2 \
216 pth_detached3.vgtest \
217 pth_detached_sem.stderr.exp \
218 pth_detached_sem.stdout.exp \
219 pth_detached_sem.vgtest \
220 pth_inconsistent_cond_wait.stderr.exp1 \
221 pth_inconsistent_cond_wait.stderr.exp2 \
222 pth_inconsistent_cond_wait.vgtest \
223 pth_mutex_reinit.stderr.exp \
224 pth_mutex_reinit.vgtest \
225 pth_once.stderr.exp \
227 pth_process_shared_mutex.stderr.exp \
228 pth_process_shared_mutex.vgtest \
229 pth_spinlock.stderr.exp \
230 pth_spinlock.vgtest \
231 pth_uninitialized_cond.stderr.exp \
232 pth_uninitialized_cond.vgtest \
233 read_and_free_race.stderr.exp \
234 read_and_free_race.vgtest \
235 recursive_mutex.stderr.exp-linux \
236 recursive_mutex.stderr.exp-darwin \
237 recursive_mutex.stderr.exp-solaris \
238 recursive_mutex.vgtest \
239 rwlock_race.stderr.exp \
240 rwlock_race.stderr.exp2 \
242 rwlock_test.stderr.exp \
244 rwlock_type_checking.stderr.exp \
245 rwlock_type_checking.vgtest \
246 sem_as_mutex.stderr.exp \
247 sem_as_mutex.stderr.exp-mips32-be \
248 sem_as_mutex.stderr.exp-mips32-le \
249 sem_as_mutex.vgtest \
250 sem_as_mutex2.stderr.exp \
251 sem_as_mutex2.vgtest \
252 sem_as_mutex3.stderr.exp \
253 sem_as_mutex3.stderr.exp-mips32-be \
254 sem_as_mutex3.stderr.exp-mips32-le \
255 sem_as_mutex3.vgtest \
256 sem_open.stderr.exp \
257 sem_open.stderr.exp-mips32-be \
258 sem_open.stderr.exp-mips32-le \
260 sem_open2.stderr.exp \
262 sem_open3.stderr.exp \
263 sem_open3.stderr.exp-mips32-be \
264 sem_open3.stderr.exp-mips32-le \
266 sem_open_traced.stderr.exp \
267 sem_open_traced.vgtest \
268 sem_wait.stderr.exp \
270 swapcontext.stderr.exp \
274 sigaltstack.stderr.exp \
276 std_atomic.stderr.exp \
278 std_list.stderr.exp \
280 std_mutex.stderr.exp \
282 std_string.stderr.exp \
284 std_thread.stderr.exp \
286 std_thread2.stderr.exp \
289 str_tester.stderr.exp \
291 tc01_simple_race.stderr.exp \
292 tc01_simple_race.vgtest \
293 tc02_simple_tls.stderr.exp \
294 tc02_simple_tls.vgtest \
295 tc03_re_excl.stderr.exp \
296 tc03_re_excl.vgtest \
297 tc04_free_lock.stderr.exp-x86 \
298 tc04_free_lock.stderr.exp-ppc \
299 tc04_free_lock.stderr.exp-s390 \
300 tc04_free_lock.vgtest \
301 tc05_simple_race.stderr.exp \
302 tc05_simple_race.vgtest \
303 tc06_two_races.stderr.exp \
304 tc06_two_races.vgtest \
305 tc07_hbl1.stderr.exp \
306 tc07_hbl1.stdout.exp \
308 tc08_hbl2.stderr.exp \
309 tc08_hbl2.stdout.exp \
311 tc09_bad_unlock.stderr.exp-x86 \
312 tc09_bad_unlock.stderr.exp-ppc \
313 tc09_bad_unlock.stderr.exp-glibc2.8 \
314 tc09_bad_unlock.stderr.exp-s390 \
315 tc09_bad_unlock.stderr.exp-solaris \
316 tc09_bad_unlock.vgtest \
317 tc10_rec_lock.stderr.exp \
318 tc10_rec_lock.vgtest \
319 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
321 tc12_rwl_trivial.stderr.exp \
322 tc12_rwl_trivial.vgtest \
323 tc13_laog1.stderr.exp \
325 tc15_laog_lockdel.stderr.exp \
326 tc15_laog_lockdel.vgtest \
327 tc16_byterace.stderr.exp \
328 tc16_byterace.vgtest \
329 tc17_sembar.stderr.exp \
331 tc18_semabuse.stderr.exp \
332 tc18_semabuse.stderr.exp-solaris \
333 tc18_semabuse.vgtest \
334 tc19_shadowmem.stderr.exp-32bit \
335 tc19_shadowmem.stderr.exp-32bit-BE \
336 tc19_shadowmem.stderr.exp-64bit \
337 tc19_shadowmem.vgtest \
338 tc21_pthonce.stderr.exp \
339 tc21_pthonce.stdout.exp \
340 tc21_pthonce.vgtest \
341 tc22_exit_w_lock.stderr.exp-32bit \
342 tc22_exit_w_lock.stderr.exp-64bit \
343 tc22_exit_w_lock.vgtest \
344 tc23_bogus_condwait.stderr.exp-linux-x86 \
345 tc23_bogus_condwait.stderr.exp-linux-ppc \
346 tc23_bogus_condwait.stderr.exp-darwin-x86 \
347 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
348 tc23_bogus_condwait.vgtest \
349 tc24_nonzero_sem.stderr.exp \
350 tc24_nonzero_sem.vgtest \
351 thread_name.stderr.exp \
353 thread_name_xml.stderr.exp \
354 thread_name_xml.vgtest \
355 threaded-fork.stderr.exp \
356 threaded-fork.vgtest \
357 threaded-fork-vcs.stderr.exp \
358 threaded-fork-vcs.vgtest \
359 tls_threads.stderr.exp \
363 unit_bitmap.stderr.exp \
373 annotate_ignore_write \
374 annotate_publish_hg \
376 annotate_trace_memory \
393 pth_cleanup_handler \
394 pth_cond_destroy_busy \
400 pth_inconsistent_cond_wait \
402 pth_process_shared_mutex \
403 pth_uninitialized_cond \
407 rwlock_type_checking \
418 check_PROGRAMS += boost_thread
421 if HAVE_BUILTIN_ATOMIC
430 if HAVE_BUILTIN_ATOMIC_CXX
432 annotate_smart_pointer \
436 # clang 3.3 will generate errors about libstdc++ headers from
437 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
438 if CXX_CAN_INCLUDE_THREAD_HEADER
439 if HAVE_SHARED_POINTER_ANNOTATION
451 check_PROGRAMS += omp_matinv omp_prime omp_printf
454 if HAVE_PTHREAD_BARRIER
465 if HAVE_PTHREAD_CREATE_GLIBC_2_0
466 check_PROGRAMS += pth_create_glibc_2_0
469 if HAVE_PTHREAD_SPINLOCK
470 check_PROGRAMS += pth_spinlock
473 if !VGCONF_OS_IS_DARWIN
474 check_PROGRAMS += sem_wait
478 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
479 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
480 -Wno-inline -Wno-unused-parameter
485 bug322621_SOURCES = bug322621.cpp
486 concurrent_close_SOURCES = concurrent_close.cpp
487 dlopen_main_LDADD = -ldl
488 dlopen_lib_so_SOURCES = dlopen_lib.c
489 dlopen_lib_so_CFLAGS = -fPIC
490 dlopen_lib_so_LDFLAGS = -shared -fPIC
491 monitor_example_SOURCES = monitor_example.cpp
492 new_delete_SOURCES = new_delete.cpp
493 new_delete_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
495 free_is_write_CFLAGS = $(AM_CFLAGS)
496 pth_barrier_CFLAGS = $(AM_CFLAGS)
497 if VGCONF_OS_IS_SOLARIS
498 free_is_write_CFLAGS += -D__EXTENSIONS__
499 pth_barrier_CFLAGS += -D__EXTENSIONS__
502 pth_create_chain_CFLAGS = $(AM_CFLAGS)
503 pth_detached_CFLAGS = $(AM_CFLAGS)
504 if VGCONF_OS_IS_SOLARIS
505 pth_create_chain_CFLAGS += -D__EXTENSIONS__
506 pth_detached_CFLAGS += -D__EXTENSIONS__
509 tsan_unittest_SOURCES = tsan_unittest.cpp
510 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
511 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
513 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
514 -DENABLE_DRD_CONSISTENCY_CHECKS \
515 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
516 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
518 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
519 unit_vc_LDADD = # nothing, i.e. not -lpthread
522 boost_thread_SOURCES = boost_thread.cpp
523 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
524 boost_thread_LDADD = $(BOOST_LIBS)
527 if HAVE_BUILTIN_ATOMIC
528 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
531 annotate_static_SOURCES = annotate_static.cpp
532 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
534 local_static_SOURCES = local_static.cpp
537 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
538 omp_matinv_LDFLAGS = -fopenmp
539 omp_matinv_LDADD = $(LDADD) -lm
541 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
542 omp_prime_LDFLAGS = -fopenmp
543 omp_prime_LDADD = $(LDADD) -lm
545 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
546 omp_printf_LDFLAGS = -fopenmp
547 omp_printf_LDADD = $(LDADD) -lm
550 matinv_CFLAGS = $(AM_CFLAGS)
551 if VGCONF_OS_IS_SOLARIS
552 matinv_CFLAGS += -D__EXTENSIONS__
554 if HAVE_PTHREAD_BARRIER
555 matinv_LDADD = $(LDADD) -lm
558 rwlock_test_CFLAGS = $(AM_CFLAGS)
559 if VGCONF_OS_IS_SOLARIS
560 rwlock_test_CFLAGS += -D__EXTENSIONS__
563 std_atomic_SOURCES = std_atomic.cpp
564 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
566 std_list_SOURCES = std_list.cpp
567 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
569 std_mutex_SOURCES = std_mutex.cpp
570 std_mutex_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
572 std_string_SOURCES = std_string.cpp
573 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
575 # Note: -Wl,--no-as-needed is a workaround for
576 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
578 std_thread_SOURCES = std_thread.cpp
579 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
580 if !VGCONF_OS_IS_SOLARIS
581 std_thread_LDFLAGS = -Wl,--no-as-needed
584 std_thread2_SOURCES = std_thread2.cpp
585 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
586 if !VGCONF_OS_IS_SOLARIS
587 std_thread2_LDFLAGS = -Wl,--no-as-needed
590 sem_wait_SOURCES = sem_wait.cpp
592 swapcontext_SOURCES = swapcontext.c