2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS = \
5 compare_error_count_with \
6 filter_annotate_barrier_xml \
10 filter_stderr_and_thread_no \
11 filter_stderr_and_thread_no_and_offset \
12 filter_stderr_solaris \
14 filter_thread_name_xml \
15 filter_xml_and_thread_no \
17 supported_libpthread \
21 tsan_thread_wrappers_pthread.h \
22 unified_annotations.h \
26 annotate_barrier.stderr.exp \
27 annotate_barrier.vgtest \
28 annotate_barrier_xml.stderr.exp \
29 annotate_barrier_xml.vgtest \
30 annotate_hb_err.stderr.exp \
31 annotate_hb_err.vgtest \
32 annotate_hb_race.stderr.exp \
33 annotate_hb_race.vgtest \
34 annotate_hbefore.stderr.exp \
35 annotate_hbefore.vgtest \
36 annotate_order_1.stderr.exp \
37 annotate_order_1.vgtest \
38 annotate_order_2.stderr.exp \
39 annotate_order_2.vgtest \
40 annotate_order_3.stderr.exp \
41 annotate_order_3.vgtest \
42 annotate_publish_hg.stderr.exp \
43 annotate_publish_hg.vgtest \
44 annotate_sem.stderr.exp \
46 annotate_smart_pointer.stderr.exp \
47 annotate_smart_pointer.vgtest \
48 annotate_smart_pointer2.stderr.exp \
49 annotate_smart_pointer2.stderr.exp-darwin \
50 annotate_smart_pointer2.vgtest \
51 annotate_spinlock.stderr.exp \
52 annotate_spinlock.vgtest \
53 annotate_rwlock.stderr.exp \
54 annotate_rwlock.vgtest \
55 annotate_rwlock_hg.stderr.exp \
56 annotate_rwlock_hg.vgtest \
57 annotate_ignore_read.stderr.exp \
58 annotate_ignore_read.vgtest \
59 annotate_ignore_rw.stderr.exp \
60 annotate_ignore_rw.vgtest \
61 annotate_ignore_rw2.stderr.exp \
62 annotate_ignore_rw2.stderr.exp-solaris \
63 annotate_ignore_rw2.vgtest \
64 annotate_ignore_write.stderr.exp \
65 annotate_ignore_write.stderr.exp-solaris \
66 annotate_ignore_write.vgtest \
67 annotate_ignore_write2.stderr.exp \
68 annotate_ignore_write2.stderr.exp-solaris \
69 annotate_ignore_write2.vgtest \
70 annotate_trace_memory.stderr.exp-32bit \
71 annotate_trace_memory.stderr.exp-64bit \
72 annotate_trace_memory.stderr.exp-mips32 \
73 annotate_trace_memory.vgtest \
74 annotate_trace_memory_xml.stderr.exp-32bit \
75 annotate_trace_memory_xml.stderr.exp-64bit \
76 annotate_trace_memory_xml.stderr.exp-mips32 \
77 annotate_trace_memory_xml.vgtest \
78 annotate_sem.stderr.exp \
80 annotate_static.stderr.exp \
81 annotate_static.vgtest \
82 atomic_var.stderr.exp \
85 bar_bad.stderr.exp-nohang \
86 bar_bad.stderr.exp-solaris \
88 bar_bad_xml.stderr.exp \
89 bar_bad_xml.stderr.exp-nohang \
90 bar_bad_xml.stderr.exp-solaris \
92 bar_trivial.stderr.exp \
93 bar_trivial.stdout.exp \
95 boost_thread.stderr.exp \
97 bug-235681.stderr.exp \
99 circular_buffer.stderr.exp \
100 circular_buffer.vgtest \
101 concurrent_close.stderr.exp \
102 concurrent_close.vgtest \
103 custom_alloc.stderr.exp \
104 custom_alloc.vgtest \
105 custom_alloc_fiw.stderr.exp \
106 custom_alloc_fiw.vgtest \
111 fp_race.stderr.exp-mips32-be \
112 fp_race.stderr.exp-mips32-le \
114 fp_race2.stderr.exp \
116 fp_race_xml.stderr.exp \
117 fp_race_xml.stderr.exp-mips32-be \
118 fp_race_xml.stderr.exp-mips32-le \
119 fp_race_xml.stderr.exp-solaris \
121 free_is_write.stderr.exp \
122 free_is_write.vgtest \
123 free_is_write2.stderr.exp \
124 free_is_write2.vgtest \
125 hg01_all_ok.stderr.exp \
127 hg02_deadlock.stderr.exp \
128 hg02_deadlock.vgtest \
129 hg03_inherit.stderr.exp \
130 hg03_inherit.vgtest \
131 hg04_race.stderr.exp \
133 hg05_race2.stderr.exp \
134 hg05_race2.stderr.exp-powerpc \
136 hg06_readshared.stderr.exp \
137 hg06_readshared.vgtest \
138 hold_lock_1.stderr.exp \
140 hold_lock_2.stderr.exp \
142 linuxthreads_det.stderr.exp \
143 linuxthreads_det.stderr.exp-linuxthreads \
144 linuxthreads_det.stdout.exp \
145 linuxthreads_det.stdout.exp-linuxthreads \
146 linuxthreads_det.vgtest \
147 local_static.stderr.exp \
148 local_static.vgtest \
152 memory_allocation.stderr.exp \
153 memory_allocation.vgtest \
154 monitor_example.stderr.exp \
155 monitor_example.vgtest \
156 new_delete.stderr.exp \
158 omp_matinv.stderr.exp \
159 omp_matinv.stdout.exp \
161 omp_matinv_racy.stderr.exp \
162 omp_matinv_racy.stdout.exp \
163 omp_matinv_racy.vgtest \
164 omp_prime_racy.stderr.exp \
165 omp_prime_racy.vgtest \
166 omp_printf.stderr.exp \
168 pth_barrier.stderr.exp \
170 pth_barrier2.stderr.exp \
171 pth_barrier2.vgtest \
172 pth_barrier3.stderr.exp \
173 pth_barrier3.vgtest \
174 pth_barrier_race.stderr.exp \
175 pth_barrier_race.vgtest \
176 pth_barrier_reinit.stderr.exp \
177 pth_barrier_reinit.vgtest \
178 pth_barrier_thr_cr.stderr.exp \
179 pth_barrier_thr_cr.vgtest \
180 pth_barrier_thr_cr.supp \
181 pth_broadcast.stderr.exp \
182 pth_broadcast.vgtest \
183 pth_cancel_locked.stderr.exp \
184 pth_cancel_locked.stderr.exp-darwin \
185 pth_cancel_locked.vgtest \
186 pth_cleanup_handler.stderr.exp \
187 pth_cleanup_handler.vgtest \
188 pth_cond_destroy_busy.stderr.exp \
189 pth_cond_destroy_busy.stderr.exp-solaris \
190 pth_cond_destroy_busy.vgtest \
191 pth_cond_race.stderr.exp \
192 pth_cond_race.vgtest \
193 pth_cond_race2.stderr.exp \
194 pth_cond_race2.vgtest \
195 pth_cond_race3.stderr.exp \
196 pth_cond_race3.vgtest \
197 pth_create_chain.stderr.exp \
198 pth_create_chain.vgtest \
199 pth_create_glibc_2_0.stderr.exp \
200 pth_create_glibc_2_0.vgtest \
201 pth_detached.stderr.exp \
202 pth_detached.stdout.exp \
203 pth_detached.vgtest \
204 pth_detached2.stderr.exp \
205 pth_detached2.stdout.exp \
206 pth_detached2.vgtest \
207 pth_detached3.stderr.exp1 \
208 pth_detached3.stderr.exp2 \
209 pth_detached3.vgtest \
210 pth_detached_sem.stderr.exp \
211 pth_detached_sem.stdout.exp \
212 pth_detached_sem.vgtest \
213 pth_inconsistent_cond_wait.stderr.exp1 \
214 pth_inconsistent_cond_wait.stderr.exp2 \
215 pth_inconsistent_cond_wait.vgtest \
216 pth_mutex_reinit.stderr.exp \
217 pth_mutex_reinit.vgtest \
218 pth_once.stderr.exp \
220 pth_process_shared_mutex.stderr.exp \
221 pth_process_shared_mutex.vgtest \
222 pth_spinlock.stderr.exp \
223 pth_spinlock.vgtest \
224 pth_uninitialized_cond.stderr.exp \
225 pth_uninitialized_cond.vgtest \
226 read_and_free_race.stderr.exp \
227 read_and_free_race.vgtest \
228 recursive_mutex.stderr.exp-linux \
229 recursive_mutex.stderr.exp-darwin \
230 recursive_mutex.stderr.exp-solaris \
231 recursive_mutex.vgtest \
232 rwlock_race.stderr.exp \
233 rwlock_race.stderr.exp2 \
235 rwlock_test.stderr.exp \
237 rwlock_type_checking.stderr.exp \
238 rwlock_type_checking.vgtest \
239 sem_as_mutex.stderr.exp \
240 sem_as_mutex.stderr.exp-mips32-be \
241 sem_as_mutex.stderr.exp-mips32-le \
242 sem_as_mutex.vgtest \
243 sem_as_mutex2.stderr.exp \
244 sem_as_mutex2.vgtest \
245 sem_as_mutex3.stderr.exp \
246 sem_as_mutex3.stderr.exp-mips32-be \
247 sem_as_mutex3.stderr.exp-mips32-le \
248 sem_as_mutex3.vgtest \
249 sem_open.stderr.exp \
250 sem_open.stderr.exp-mips32-be \
251 sem_open.stderr.exp-mips32-le \
253 sem_open2.stderr.exp \
255 sem_open3.stderr.exp \
256 sem_open3.stderr.exp-mips32-be \
257 sem_open3.stderr.exp-mips32-le \
259 sem_open_traced.stderr.exp \
260 sem_open_traced.vgtest \
261 sem_wait.stderr.exp \
265 sigaltstack.stderr.exp \
267 std_atomic.stderr.exp \
269 std_list.stderr.exp \
271 std_string.stderr.exp \
273 std_thread.stderr.exp \
275 std_thread2.stderr.exp \
278 str_tester.stderr.exp \
280 tc01_simple_race.stderr.exp \
281 tc01_simple_race.vgtest \
282 tc02_simple_tls.stderr.exp \
283 tc02_simple_tls.vgtest \
284 tc03_re_excl.stderr.exp \
285 tc03_re_excl.vgtest \
286 tc04_free_lock.stderr.exp-x86 \
287 tc04_free_lock.stderr.exp-ppc \
288 tc04_free_lock.stderr.exp-s390 \
289 tc04_free_lock.vgtest \
290 tc05_simple_race.stderr.exp \
291 tc05_simple_race.vgtest \
292 tc06_two_races.stderr.exp \
293 tc06_two_races.vgtest \
294 tc07_hbl1.stderr.exp \
295 tc07_hbl1.stdout.exp \
297 tc08_hbl2.stderr.exp \
298 tc08_hbl2.stdout.exp \
300 tc09_bad_unlock.stderr.exp-x86 \
301 tc09_bad_unlock.stderr.exp-ppc \
302 tc09_bad_unlock.stderr.exp-glibc2.8 \
303 tc09_bad_unlock.stderr.exp-s390 \
304 tc09_bad_unlock.stderr.exp-solaris \
305 tc09_bad_unlock.vgtest \
306 tc10_rec_lock.stderr.exp \
307 tc10_rec_lock.vgtest \
308 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
310 tc12_rwl_trivial.stderr.exp \
311 tc12_rwl_trivial.vgtest \
312 tc13_laog1.stderr.exp \
314 tc15_laog_lockdel.stderr.exp \
315 tc15_laog_lockdel.vgtest \
316 tc16_byterace.stderr.exp \
317 tc16_byterace.vgtest \
318 tc17_sembar.stderr.exp \
320 tc18_semabuse.stderr.exp \
321 tc18_semabuse.stderr.exp-solaris \
322 tc18_semabuse.vgtest \
323 tc19_shadowmem.stderr.exp-32bit \
324 tc19_shadowmem.stderr.exp-32bit-BE \
325 tc19_shadowmem.stderr.exp-64bit \
326 tc19_shadowmem.vgtest \
327 tc21_pthonce.stderr.exp \
328 tc21_pthonce.stdout.exp \
329 tc21_pthonce.vgtest \
330 tc22_exit_w_lock.stderr.exp-32bit \
331 tc22_exit_w_lock.stderr.exp-64bit \
332 tc22_exit_w_lock.vgtest \
333 tc23_bogus_condwait.stderr.exp-linux-x86 \
334 tc23_bogus_condwait.stderr.exp-linux-ppc \
335 tc23_bogus_condwait.stderr.exp-darwin-x86 \
336 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
337 tc23_bogus_condwait.vgtest \
338 tc24_nonzero_sem.stderr.exp \
339 tc24_nonzero_sem.vgtest \
340 thread_name.stderr.exp \
342 thread_name_xml.stderr.exp \
343 thread_name_xml.vgtest \
344 threaded-fork.stderr.exp \
345 threaded-fork.vgtest \
346 threaded-fork-vcs.stderr.exp \
347 threaded-fork-vcs.vgtest \
348 tls_threads.stderr.exp \
352 unit_bitmap.stderr.exp \
362 annotate_ignore_write \
363 annotate_publish_hg \
365 annotate_trace_memory \
381 pth_cleanup_handler \
382 pth_cond_destroy_busy \
388 pth_inconsistent_cond_wait \
390 pth_process_shared_mutex \
391 pth_uninitialized_cond \
395 rwlock_type_checking \
405 check_PROGRAMS += boost_thread
408 if HAVE_BUILTIN_ATOMIC
417 if HAVE_BUILTIN_ATOMIC_CXX
419 annotate_smart_pointer \
423 # clang 3.3 will generate errors about libstdc++ headers from
424 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
425 if CXX_CAN_INCLUDE_THREAD_HEADER
426 if HAVE_SHARED_POINTER_ANNOTATION
437 check_PROGRAMS += omp_matinv omp_prime omp_printf
440 if HAVE_PTHREAD_BARRIER
441 check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit \
442 pth_barrier_thr_cr thread_name
445 if HAVE_PTHREAD_CREATE_GLIBC_2_0
446 check_PROGRAMS += pth_create_glibc_2_0
449 if HAVE_PTHREAD_SPINLOCK
450 check_PROGRAMS += pth_spinlock
453 if !VGCONF_OS_IS_DARWIN
454 check_PROGRAMS += sem_wait
458 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
459 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
460 -Wno-inline -Wno-unused-parameter
465 concurrent_close_SOURCES = concurrent_close.cpp
466 dlopen_main_LDADD = -ldl
467 dlopen_lib_so_SOURCES = dlopen_lib.c
468 dlopen_lib_so_CFLAGS = -fPIC
469 dlopen_lib_so_LDFLAGS = -shared -fPIC
470 monitor_example_SOURCES = monitor_example.cpp
471 new_delete_SOURCES = new_delete.cpp
472 new_delete_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
474 free_is_write_CFLAGS = $(AM_CFLAGS)
475 pth_barrier_CFLAGS = $(AM_CFLAGS)
476 if VGCONF_OS_IS_SOLARIS
477 free_is_write_CFLAGS += -D__EXTENSIONS__
478 pth_barrier_CFLAGS += -D__EXTENSIONS__
481 pth_create_chain_CFLAGS = $(AM_CFLAGS)
482 pth_detached_CFLAGS = $(AM_CFLAGS)
483 if VGCONF_OS_IS_SOLARIS
484 pth_create_chain_CFLAGS += -D__EXTENSIONS__
485 pth_detached_CFLAGS += -D__EXTENSIONS__
488 tsan_unittest_SOURCES = tsan_unittest.cpp
489 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
490 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
492 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
493 -DENABLE_DRD_CONSISTENCY_CHECKS \
494 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
495 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
497 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
498 unit_vc_LDADD = # nothing, i.e. not -lpthread
501 boost_thread_SOURCES = boost_thread.cpp
502 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
503 boost_thread_LDADD = $(BOOST_LIBS)
506 if HAVE_BUILTIN_ATOMIC
507 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
510 annotate_static_SOURCES = annotate_static.cpp
511 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
513 local_static_SOURCES = local_static.cpp
516 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
517 omp_matinv_LDFLAGS = -fopenmp
518 omp_matinv_LDADD = $(LDADD) -lm
520 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
521 omp_prime_LDFLAGS = -fopenmp
522 omp_prime_LDADD = $(LDADD) -lm
524 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
525 omp_printf_LDFLAGS = -fopenmp
526 omp_printf_LDADD = $(LDADD) -lm
529 matinv_CFLAGS = $(AM_CFLAGS)
530 if VGCONF_OS_IS_SOLARIS
531 matinv_CFLAGS += -D__EXTENSIONS__
533 if HAVE_PTHREAD_BARRIER
534 matinv_LDADD = $(LDADD) -lm
537 rwlock_test_CFLAGS = $(AM_CFLAGS)
538 if VGCONF_OS_IS_SOLARIS
539 rwlock_test_CFLAGS += -D__EXTENSIONS__
542 std_atomic_SOURCES = std_atomic.cpp
543 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
545 std_list_SOURCES = std_list.cpp
546 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
548 std_string_SOURCES = std_string.cpp
549 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
551 # Note: -Wl,--no-as-needed is a workaround for
552 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
554 std_thread_SOURCES = std_thread.cpp
555 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
556 if !VGCONF_OS_IS_SOLARIS
557 std_thread_LDFLAGS = -Wl,--no-as-needed
560 std_thread2_SOURCES = std_thread2.cpp
561 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
562 if !VGCONF_OS_IS_SOLARIS
563 std_thread2_LDFLAGS = -Wl,--no-as-needed
566 sem_wait_SOURCES = sem_wait.cpp