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 \
25 annotate_barrier.stderr.exp \
26 annotate_barrier.vgtest \
27 annotate_barrier_xml.stderr.exp \
28 annotate_barrier_xml.vgtest \
29 annotate_hb_err.stderr.exp \
30 annotate_hb_err.vgtest \
31 annotate_hb_race.stderr.exp \
32 annotate_hb_race.vgtest \
33 annotate_hbefore.stderr.exp \
34 annotate_hbefore.vgtest \
35 annotate_order_1.stderr.exp \
36 annotate_order_1.vgtest \
37 annotate_order_2.stderr.exp \
38 annotate_order_2.vgtest \
39 annotate_order_3.stderr.exp \
40 annotate_order_3.vgtest \
41 annotate_publish_hg.stderr.exp \
42 annotate_publish_hg.vgtest \
43 annotate_sem.stderr.exp \
45 annotate_smart_pointer.stderr.exp \
46 annotate_smart_pointer.vgtest \
47 annotate_smart_pointer2.stderr.exp \
48 annotate_smart_pointer2.stderr.exp-darwin \
49 annotate_smart_pointer2.vgtest \
50 annotate_spinlock.stderr.exp \
51 annotate_spinlock.vgtest \
52 annotate_rwlock.stderr.exp \
53 annotate_rwlock.vgtest \
54 annotate_rwlock_hg.stderr.exp \
55 annotate_rwlock_hg.vgtest \
56 annotate_ignore_read.stderr.exp \
57 annotate_ignore_read.vgtest \
58 annotate_ignore_rw.stderr.exp \
59 annotate_ignore_rw.vgtest \
60 annotate_ignore_rw2.stderr.exp \
61 annotate_ignore_rw2.stderr.exp-solaris \
62 annotate_ignore_rw2.vgtest \
63 annotate_ignore_write.stderr.exp \
64 annotate_ignore_write.stderr.exp-solaris \
65 annotate_ignore_write.vgtest \
66 annotate_ignore_write2.stderr.exp \
67 annotate_ignore_write2.stderr.exp-solaris \
68 annotate_ignore_write2.vgtest \
69 annotate_trace_memory.stderr.exp-32bit \
70 annotate_trace_memory.stderr.exp-64bit \
71 annotate_trace_memory.stderr.exp-mips32 \
72 annotate_trace_memory.vgtest \
73 annotate_trace_memory_xml.stderr.exp-32bit \
74 annotate_trace_memory_xml.stderr.exp-64bit \
75 annotate_trace_memory_xml.stderr.exp-mips32 \
76 annotate_trace_memory_xml.vgtest \
77 annotate_sem.stderr.exp \
79 annotate_static.stderr.exp \
80 annotate_static.vgtest \
81 atomic_var.stderr.exp \
85 bar_bad_xml.stderr.exp \
87 bar_trivial.stderr.exp \
88 bar_trivial.stdout.exp \
90 boost_thread.stderr.exp \
92 bug-235681.stderr.exp \
94 circular_buffer.stderr.exp \
95 circular_buffer.vgtest \
96 concurrent_close.stderr.exp \
97 concurrent_close.vgtest \
98 custom_alloc.stderr.exp \
100 custom_alloc_fiw.stderr.exp \
101 custom_alloc_fiw.vgtest \
103 fp_race.stderr.exp-mips32-be \
104 fp_race.stderr.exp-mips32-le \
106 fp_race2.stderr.exp \
108 fp_race_xml.stderr.exp \
109 fp_race_xml.stderr.exp-mips32-be \
110 fp_race_xml.stderr.exp-mips32-le \
111 fp_race_xml.stderr.exp-solaris \
113 free_is_write.stderr.exp \
114 free_is_write.vgtest \
115 free_is_write2.stderr.exp \
116 free_is_write2.vgtest \
117 hg01_all_ok.stderr.exp \
119 hg02_deadlock.stderr.exp \
120 hg02_deadlock.vgtest \
121 hg03_inherit.stderr.exp \
122 hg03_inherit.vgtest \
123 hg04_race.stderr.exp \
125 hg05_race2.stderr.exp \
126 hg05_race2.stderr.exp-powerpc \
128 hg06_readshared.stderr.exp \
129 hg06_readshared.vgtest \
130 hold_lock_1.stderr.exp \
132 hold_lock_2.stderr.exp \
134 linuxthreads_det.stderr.exp \
135 linuxthreads_det.stderr.exp-linuxthreads \
136 linuxthreads_det.stdout.exp \
137 linuxthreads_det.stdout.exp-linuxthreads \
138 linuxthreads_det.vgtest \
139 local_static.stderr.exp \
140 local_static.vgtest \
144 memory_allocation.stderr.exp \
145 memory_allocation.vgtest \
146 monitor_example.stderr.exp \
147 monitor_example.vgtest \
148 new_delete.stderr.exp \
150 omp_matinv.stderr.exp \
151 omp_matinv.stdout.exp \
153 omp_matinv_racy.stderr.exp \
154 omp_matinv_racy.stdout.exp \
155 omp_matinv_racy.vgtest \
156 omp_prime_racy.stderr.exp \
157 omp_prime_racy.vgtest \
158 omp_printf.stderr.exp \
160 pth_barrier.stderr.exp \
162 pth_barrier2.stderr.exp \
163 pth_barrier2.vgtest \
164 pth_barrier3.stderr.exp \
165 pth_barrier3.vgtest \
166 pth_barrier_race.stderr.exp \
167 pth_barrier_race.vgtest \
168 pth_barrier_reinit.stderr.exp \
169 pth_barrier_reinit.vgtest \
170 pth_barrier_thr_cr.stderr.exp \
171 pth_barrier_thr_cr.vgtest \
172 pth_barrier_thr_cr.supp \
173 pth_broadcast.stderr.exp \
174 pth_broadcast.vgtest \
175 pth_cancel_locked.stderr.exp \
176 pth_cancel_locked.stderr.exp-darwin \
177 pth_cancel_locked.vgtest \
178 pth_cleanup_handler.stderr.exp \
179 pth_cleanup_handler.vgtest \
180 pth_cond_destroy_busy.stderr.exp \
181 pth_cond_destroy_busy.stderr.exp-solaris \
182 pth_cond_destroy_busy.vgtest \
183 pth_cond_race.stderr.exp \
184 pth_cond_race.vgtest \
185 pth_cond_race2.stderr.exp \
186 pth_cond_race2.vgtest \
187 pth_cond_race3.stderr.exp \
188 pth_cond_race3.vgtest \
189 pth_create_chain.stderr.exp \
190 pth_create_chain.vgtest \
191 pth_create_glibc_2_0.stderr.exp \
192 pth_create_glibc_2_0.vgtest \
193 pth_detached.stderr.exp \
194 pth_detached.stdout.exp \
195 pth_detached.vgtest \
196 pth_detached2.stderr.exp \
197 pth_detached2.stdout.exp \
198 pth_detached2.vgtest \
199 pth_detached3.stderr.exp1 \
200 pth_detached3.stderr.exp2 \
201 pth_detached3.vgtest \
202 pth_detached_sem.stderr.exp \
203 pth_detached_sem.stdout.exp \
204 pth_detached_sem.vgtest \
205 pth_inconsistent_cond_wait.stderr.exp1 \
206 pth_inconsistent_cond_wait.stderr.exp2 \
207 pth_inconsistent_cond_wait.vgtest \
208 pth_mutex_reinit.stderr.exp \
209 pth_mutex_reinit.vgtest \
210 pth_once.stderr.exp \
212 pth_process_shared_mutex.stderr.exp \
213 pth_process_shared_mutex.vgtest \
214 pth_spinlock.stderr.exp \
215 pth_spinlock.vgtest \
216 pth_uninitialized_cond.stderr.exp \
217 pth_uninitialized_cond.vgtest \
218 read_and_free_race.stderr.exp \
219 read_and_free_race.vgtest \
220 recursive_mutex.stderr.exp-linux \
221 recursive_mutex.stderr.exp-darwin \
222 recursive_mutex.stderr.exp-solaris \
223 recursive_mutex.vgtest \
224 rwlock_race.stderr.exp \
225 rwlock_race.stderr.exp2 \
227 rwlock_test.stderr.exp \
229 rwlock_type_checking.stderr.exp \
230 rwlock_type_checking.vgtest \
231 sem_as_mutex.stderr.exp \
232 sem_as_mutex.stderr.exp-mips32-be \
233 sem_as_mutex.stderr.exp-mips32-le \
234 sem_as_mutex.vgtest \
235 sem_as_mutex2.stderr.exp \
236 sem_as_mutex2.vgtest \
237 sem_as_mutex3.stderr.exp \
238 sem_as_mutex3.stderr.exp-mips32-be \
239 sem_as_mutex3.stderr.exp-mips32-le \
240 sem_as_mutex3.vgtest \
241 sem_open.stderr.exp \
242 sem_open.stderr.exp-mips32-be \
243 sem_open.stderr.exp-mips32-le \
245 sem_open2.stderr.exp \
247 sem_open3.stderr.exp \
248 sem_open3.stderr.exp-mips32-be \
249 sem_open3.stderr.exp-mips32-le \
251 sem_open_traced.stderr.exp \
252 sem_open_traced.vgtest \
253 sem_wait.stderr.exp \
257 sigaltstack.stderr.exp \
259 std_atomic.stderr.exp \
261 std_list.stderr.exp \
263 std_string.stderr.exp \
265 std_thread.stderr.exp \
267 std_thread2.stderr.exp \
270 str_tester.stderr.exp \
272 tc01_simple_race.stderr.exp \
273 tc01_simple_race.vgtest \
274 tc02_simple_tls.stderr.exp \
275 tc02_simple_tls.vgtest \
276 tc03_re_excl.stderr.exp \
277 tc03_re_excl.vgtest \
278 tc04_free_lock.stderr.exp-x86 \
279 tc04_free_lock.stderr.exp-ppc \
280 tc04_free_lock.stderr.exp-s390 \
281 tc04_free_lock.vgtest \
282 tc05_simple_race.stderr.exp \
283 tc05_simple_race.vgtest \
284 tc06_two_races.stderr.exp \
285 tc06_two_races.vgtest \
286 tc07_hbl1.stderr.exp \
287 tc07_hbl1.stdout.exp \
289 tc08_hbl2.stderr.exp \
290 tc08_hbl2.stdout.exp \
292 tc09_bad_unlock.stderr.exp-x86 \
293 tc09_bad_unlock.stderr.exp-ppc \
294 tc09_bad_unlock.stderr.exp-glibc2.8 \
295 tc09_bad_unlock.stderr.exp-s390 \
296 tc09_bad_unlock.stderr.exp-solaris \
297 tc09_bad_unlock.vgtest \
298 tc10_rec_lock.stderr.exp \
299 tc10_rec_lock.vgtest \
300 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
302 tc12_rwl_trivial.stderr.exp \
303 tc12_rwl_trivial.vgtest \
304 tc13_laog1.stderr.exp \
306 tc15_laog_lockdel.stderr.exp \
307 tc15_laog_lockdel.vgtest \
308 tc16_byterace.stderr.exp \
309 tc16_byterace.vgtest \
310 tc17_sembar.stderr.exp \
312 tc18_semabuse.stderr.exp \
313 tc18_semabuse.stderr.exp-solaris \
314 tc18_semabuse.vgtest \
315 tc19_shadowmem.stderr.exp-32bit \
316 tc19_shadowmem.stderr.exp-64bit \
317 tc19_shadowmem.vgtest \
318 tc21_pthonce.stderr.exp \
319 tc21_pthonce.stdout.exp \
320 tc21_pthonce.vgtest \
321 tc22_exit_w_lock.stderr.exp-32bit \
322 tc22_exit_w_lock.stderr.exp-64bit \
323 tc22_exit_w_lock.vgtest \
324 tc23_bogus_condwait.stderr.exp-linux-x86 \
325 tc23_bogus_condwait.stderr.exp-linux-ppc \
326 tc23_bogus_condwait.stderr.exp-darwin-x86 \
327 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
328 tc23_bogus_condwait.vgtest \
329 tc24_nonzero_sem.stderr.exp \
330 tc24_nonzero_sem.vgtest \
331 thread_name.stderr.exp \
333 thread_name_xml.stderr.exp \
334 thread_name_xml.vgtest \
335 threaded-fork.stderr.exp \
336 threaded-fork.vgtest \
337 threaded-fork-vcs.stderr.exp \
338 threaded-fork-vcs.vgtest \
339 tls_threads.stderr.exp \
343 unit_bitmap.stderr.exp \
353 annotate_ignore_write \
354 annotate_publish_hg \
356 annotate_trace_memory \
370 pth_cleanup_handler \
371 pth_cond_destroy_busy \
377 pth_inconsistent_cond_wait \
379 pth_process_shared_mutex \
380 pth_uninitialized_cond \
384 rwlock_type_checking \
394 check_PROGRAMS += boost_thread
397 if HAVE_BUILTIN_ATOMIC
406 if HAVE_BUILTIN_ATOMIC_CXX
408 annotate_smart_pointer \
412 # clang 3.3 will generate errors about libstdc++ headers from
413 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
414 if CXX_CAN_INCLUDE_THREAD_HEADER
415 if HAVE_SHARED_POINTER_ANNOTATION
426 check_PROGRAMS += omp_matinv omp_prime omp_printf
429 if HAVE_PTHREAD_BARRIER
430 check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit \
431 pth_barrier_thr_cr thread_name
434 if HAVE_PTHREAD_CREATE_GLIBC_2_0
435 check_PROGRAMS += pth_create_glibc_2_0
438 if HAVE_PTHREAD_SPINLOCK
439 check_PROGRAMS += pth_spinlock
442 if !VGCONF_OS_IS_DARWIN
443 check_PROGRAMS += sem_wait
447 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
448 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
453 concurrent_close_SOURCES = concurrent_close.cpp
454 monitor_example_SOURCES = monitor_example.cpp
455 new_delete_SOURCES = new_delete.cpp
457 free_is_write_CFLAGS = $(AM_CFLAGS)
458 pth_barrier_CFLAGS = $(AM_CFLAGS)
459 if VGCONF_OS_IS_SOLARIS
460 free_is_write_CFLAGS += -D__EXTENSIONS__
461 pth_barrier_CFLAGS += -D__EXTENSIONS__
464 pth_create_chain_CFLAGS = $(AM_CFLAGS)
465 pth_detached_CFLAGS = $(AM_CFLAGS)
466 if VGCONF_OS_IS_SOLARIS
467 pth_create_chain_CFLAGS += -D__EXTENSIONS__
468 pth_detached_CFLAGS += -D__EXTENSIONS__
471 tsan_unittest_SOURCES = tsan_unittest.cpp
472 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
473 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
475 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
476 -DENABLE_DRD_CONSISTENCY_CHECKS \
477 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
478 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
480 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
481 unit_vc_LDADD = # nothing, i.e. not -lpthread
484 boost_thread_SOURCES = boost_thread.cpp
485 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
486 boost_thread_LDADD = $(BOOST_LIBS)
489 if HAVE_BUILTIN_ATOMIC
490 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
493 annotate_static_SOURCES = annotate_static.cpp
494 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
496 local_static_SOURCES = local_static.cpp
499 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
500 omp_matinv_LDFLAGS = -fopenmp
501 omp_matinv_LDADD = $(LDADD) -lm
503 if VGCONF_OS_IS_SOLARIS
504 omp_matinv_CFLAGS += -std=gnu99
507 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
508 omp_prime_LDFLAGS = -fopenmp
509 omp_prime_LDADD = $(LDADD) -lm
511 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
512 omp_printf_LDFLAGS = -fopenmp
513 omp_printf_LDADD = $(LDADD) -lm
516 matinv_CFLAGS = $(AM_CFLAGS)
517 if VGCONF_OS_IS_SOLARIS
518 matinv_CFLAGS += -std=gnu99 -D__EXTENSIONS__
520 if HAVE_PTHREAD_BARRIER
521 matinv_LDADD = $(LDADD) -lm
524 rwlock_test_CFLAGS = $(AM_CFLAGS)
525 if VGCONF_OS_IS_SOLARIS
526 rwlock_test_CFLAGS += -D__EXTENSIONS__
529 std_atomic_SOURCES = std_atomic.cpp
530 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
532 std_list_SOURCES = std_list.cpp
533 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
535 std_string_SOURCES = std_string.cpp
536 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
538 # Note: -Wl,--no-as-needed is a workaround for
539 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
541 std_thread_SOURCES = std_thread.cpp
542 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
543 if !VGCONF_OS_IS_SOLARIS
544 std_thread_LDFLAGS = -Wl,--no-as-needed
547 std_thread2_SOURCES = std_thread2.cpp
548 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
549 if !VGCONF_OS_IS_SOLARIS
550 std_thread2_LDFLAGS = -Wl,--no-as-needed
553 sem_wait_SOURCES = sem_wait.cpp