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 bug322621.stderr.exp \
87 bar_bad.stderr.exp-nohang \
88 bar_bad.stderr.exp-solaris \
90 bar_bad_xml.stderr.exp \
91 bar_bad_xml.stderr.exp-nohang \
92 bar_bad_xml.stderr.exp-solaris \
94 bar_trivial.stderr.exp \
95 bar_trivial.stdout.exp \
97 boost_thread.stderr.exp \
99 bug-235681.stderr.exp \
101 circular_buffer.stderr.exp \
102 circular_buffer.vgtest \
103 concurrent_close.stderr.exp \
104 concurrent_close.vgtest \
105 custom_alloc.stderr.exp \
106 custom_alloc.vgtest \
107 custom_alloc_fiw.stderr.exp \
108 custom_alloc_fiw.vgtest \
112 fork-serial.stderr.exp \
114 fork-parallel.stderr.exp \
115 fork-parallel.vgtest \
117 fp_race.stderr.exp-mips32-be \
118 fp_race.stderr.exp-mips32-le \
120 fp_race2.stderr.exp \
122 fp_race_xml.stderr.exp \
123 fp_race_xml.stderr.exp-mips32-be \
124 fp_race_xml.stderr.exp-mips32-le \
125 fp_race_xml.stderr.exp-solaris \
127 free_is_write.stderr.exp \
128 free_is_write.vgtest \
129 free_is_write2.stderr.exp \
130 free_is_write2.vgtest \
131 hg01_all_ok.stderr.exp \
133 hg02_deadlock.stderr.exp \
134 hg02_deadlock.vgtest \
135 hg03_inherit.stderr.exp \
136 hg03_inherit.vgtest \
137 hg04_race.stderr.exp \
139 hg05_race2.stderr.exp \
140 hg05_race2.stderr.exp-powerpc \
142 hg06_readshared.stderr.exp \
143 hg06_readshared.vgtest \
144 hold_lock_1.stderr.exp \
146 hold_lock_2.stderr.exp \
148 linuxthreads_det.stderr.exp \
149 linuxthreads_det.stderr.exp-linuxthreads \
150 linuxthreads_det.stdout.exp \
151 linuxthreads_det.stdout.exp-linuxthreads \
152 linuxthreads_det.vgtest \
153 local_static.stderr.exp \
154 local_static.vgtest \
158 memory_allocation.stderr.exp \
159 memory_allocation.vgtest \
160 monitor_example.stderr.exp \
161 monitor_example.vgtest \
162 new_delete.stderr.exp \
164 omp_matinv.stderr.exp \
165 omp_matinv.stdout.exp \
167 omp_matinv_racy.stderr.exp \
168 omp_matinv_racy.stdout.exp \
169 omp_matinv_racy.vgtest \
170 omp_prime_racy.stderr.exp \
171 omp_prime_racy.vgtest \
172 omp_printf.stderr.exp \
174 pth_barrier.stderr.exp \
176 pth_barrier2.stderr.exp \
177 pth_barrier2.vgtest \
178 pth_barrier3.stderr.exp \
179 pth_barrier3.vgtest \
180 pth_barrier_race.stderr.exp \
181 pth_barrier_race.vgtest \
182 pth_barrier_reinit.stderr.exp \
183 pth_barrier_reinit.vgtest \
184 pth_barrier_thr_cr.stderr.exp \
185 pth_barrier_thr_cr.vgtest \
186 pth_barrier_thr_cr.supp \
187 pth_broadcast.stderr.exp \
188 pth_broadcast.vgtest \
189 pth_cancel_locked.stderr.exp \
190 pth_cancel_locked.stderr.exp-darwin \
191 pth_cancel_locked.vgtest \
192 pth_cleanup_handler.stderr.exp \
193 pth_cleanup_handler.vgtest \
194 pth_cond_destroy_busy.stderr.exp \
195 pth_cond_destroy_busy.stderr.exp-solaris \
196 pth_cond_destroy_busy.vgtest \
197 pth_cond_race.stderr.exp \
198 pth_cond_race.vgtest \
199 pth_cond_race2.stderr.exp \
200 pth_cond_race2.vgtest \
201 pth_cond_race3.stderr.exp \
202 pth_cond_race3.vgtest \
203 pth_create_chain.stderr.exp \
204 pth_create_chain.vgtest \
205 pth_create_glibc_2_0.stderr.exp \
206 pth_create_glibc_2_0.vgtest \
207 pth_detached.stderr.exp \
208 pth_detached.stdout.exp \
209 pth_detached.vgtest \
210 pth_detached2.stderr.exp \
211 pth_detached2.stdout.exp \
212 pth_detached2.vgtest \
213 pth_detached3.stderr.exp1 \
214 pth_detached3.stderr.exp2 \
215 pth_detached3.vgtest \
216 pth_detached_sem.stderr.exp \
217 pth_detached_sem.stdout.exp \
218 pth_detached_sem.vgtest \
219 pth_inconsistent_cond_wait.stderr.exp1 \
220 pth_inconsistent_cond_wait.stderr.exp2 \
221 pth_inconsistent_cond_wait.vgtest \
222 pth_mutex_reinit.stderr.exp \
223 pth_mutex_reinit.vgtest \
224 pth_once.stderr.exp \
226 pth_process_shared_mutex.stderr.exp \
227 pth_process_shared_mutex.vgtest \
228 pth_spinlock.stderr.exp \
229 pth_spinlock.vgtest \
230 pth_uninitialized_cond.stderr.exp \
231 pth_uninitialized_cond.vgtest \
232 read_and_free_race.stderr.exp \
233 read_and_free_race.vgtest \
234 recursive_mutex.stderr.exp-linux \
235 recursive_mutex.stderr.exp-darwin \
236 recursive_mutex.stderr.exp-solaris \
237 recursive_mutex.vgtest \
238 rwlock_race.stderr.exp \
239 rwlock_race.stderr.exp2 \
241 rwlock_test.stderr.exp \
243 rwlock_type_checking.stderr.exp \
244 rwlock_type_checking.vgtest \
245 sem_as_mutex.stderr.exp \
246 sem_as_mutex.stderr.exp-mips32-be \
247 sem_as_mutex.stderr.exp-mips32-le \
248 sem_as_mutex.vgtest \
249 sem_as_mutex2.stderr.exp \
250 sem_as_mutex2.vgtest \
251 sem_as_mutex3.stderr.exp \
252 sem_as_mutex3.stderr.exp-mips32-be \
253 sem_as_mutex3.stderr.exp-mips32-le \
254 sem_as_mutex3.vgtest \
255 sem_open.stderr.exp \
256 sem_open.stderr.exp-mips32-be \
257 sem_open.stderr.exp-mips32-le \
259 sem_open2.stderr.exp \
261 sem_open3.stderr.exp \
262 sem_open3.stderr.exp-mips32-be \
263 sem_open3.stderr.exp-mips32-le \
265 sem_open_traced.stderr.exp \
266 sem_open_traced.vgtest \
267 sem_wait.stderr.exp \
271 sigaltstack.stderr.exp \
273 std_atomic.stderr.exp \
275 std_list.stderr.exp \
277 std_string.stderr.exp \
279 std_thread.stderr.exp \
281 std_thread2.stderr.exp \
284 str_tester.stderr.exp \
286 tc01_simple_race.stderr.exp \
287 tc01_simple_race.vgtest \
288 tc02_simple_tls.stderr.exp \
289 tc02_simple_tls.vgtest \
290 tc03_re_excl.stderr.exp \
291 tc03_re_excl.vgtest \
292 tc04_free_lock.stderr.exp-x86 \
293 tc04_free_lock.stderr.exp-ppc \
294 tc04_free_lock.stderr.exp-s390 \
295 tc04_free_lock.vgtest \
296 tc05_simple_race.stderr.exp \
297 tc05_simple_race.vgtest \
298 tc06_two_races.stderr.exp \
299 tc06_two_races.vgtest \
300 tc07_hbl1.stderr.exp \
301 tc07_hbl1.stdout.exp \
303 tc08_hbl2.stderr.exp \
304 tc08_hbl2.stdout.exp \
306 tc09_bad_unlock.stderr.exp-x86 \
307 tc09_bad_unlock.stderr.exp-ppc \
308 tc09_bad_unlock.stderr.exp-glibc2.8 \
309 tc09_bad_unlock.stderr.exp-s390 \
310 tc09_bad_unlock.stderr.exp-solaris \
311 tc09_bad_unlock.vgtest \
312 tc10_rec_lock.stderr.exp \
313 tc10_rec_lock.vgtest \
314 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
316 tc12_rwl_trivial.stderr.exp \
317 tc12_rwl_trivial.vgtest \
318 tc13_laog1.stderr.exp \
320 tc15_laog_lockdel.stderr.exp \
321 tc15_laog_lockdel.vgtest \
322 tc16_byterace.stderr.exp \
323 tc16_byterace.vgtest \
324 tc17_sembar.stderr.exp \
326 tc18_semabuse.stderr.exp \
327 tc18_semabuse.stderr.exp-solaris \
328 tc18_semabuse.vgtest \
329 tc19_shadowmem.stderr.exp-32bit \
330 tc19_shadowmem.stderr.exp-32bit-BE \
331 tc19_shadowmem.stderr.exp-64bit \
332 tc19_shadowmem.vgtest \
333 tc21_pthonce.stderr.exp \
334 tc21_pthonce.stdout.exp \
335 tc21_pthonce.vgtest \
336 tc22_exit_w_lock.stderr.exp-32bit \
337 tc22_exit_w_lock.stderr.exp-64bit \
338 tc22_exit_w_lock.vgtest \
339 tc23_bogus_condwait.stderr.exp-linux-x86 \
340 tc23_bogus_condwait.stderr.exp-linux-ppc \
341 tc23_bogus_condwait.stderr.exp-darwin-x86 \
342 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
343 tc23_bogus_condwait.vgtest \
344 tc24_nonzero_sem.stderr.exp \
345 tc24_nonzero_sem.vgtest \
346 thread_name.stderr.exp \
348 thread_name_xml.stderr.exp \
349 thread_name_xml.vgtest \
350 threaded-fork.stderr.exp \
351 threaded-fork.vgtest \
352 threaded-fork-vcs.stderr.exp \
353 threaded-fork-vcs.vgtest \
354 tls_threads.stderr.exp \
358 unit_bitmap.stderr.exp \
368 annotate_ignore_write \
369 annotate_publish_hg \
371 annotate_trace_memory \
388 pth_cleanup_handler \
389 pth_cond_destroy_busy \
395 pth_inconsistent_cond_wait \
397 pth_process_shared_mutex \
398 pth_uninitialized_cond \
402 rwlock_type_checking \
412 check_PROGRAMS += boost_thread
415 if HAVE_BUILTIN_ATOMIC
424 if HAVE_BUILTIN_ATOMIC_CXX
426 annotate_smart_pointer \
430 # clang 3.3 will generate errors about libstdc++ headers from
431 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
432 if CXX_CAN_INCLUDE_THREAD_HEADER
433 if HAVE_SHARED_POINTER_ANNOTATION
444 check_PROGRAMS += omp_matinv omp_prime omp_printf
447 if HAVE_PTHREAD_BARRIER
458 if HAVE_PTHREAD_CREATE_GLIBC_2_0
459 check_PROGRAMS += pth_create_glibc_2_0
462 if HAVE_PTHREAD_SPINLOCK
463 check_PROGRAMS += pth_spinlock
466 if !VGCONF_OS_IS_DARWIN
467 check_PROGRAMS += sem_wait
471 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
472 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
473 -Wno-inline -Wno-unused-parameter
478 bug322621_SOURCES = bug322621.cpp
479 concurrent_close_SOURCES = concurrent_close.cpp
480 dlopen_main_LDADD = -ldl
481 dlopen_lib_so_SOURCES = dlopen_lib.c
482 dlopen_lib_so_CFLAGS = -fPIC
483 dlopen_lib_so_LDFLAGS = -shared -fPIC
484 monitor_example_SOURCES = monitor_example.cpp
485 new_delete_SOURCES = new_delete.cpp
486 new_delete_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
488 free_is_write_CFLAGS = $(AM_CFLAGS)
489 pth_barrier_CFLAGS = $(AM_CFLAGS)
490 if VGCONF_OS_IS_SOLARIS
491 free_is_write_CFLAGS += -D__EXTENSIONS__
492 pth_barrier_CFLAGS += -D__EXTENSIONS__
495 pth_create_chain_CFLAGS = $(AM_CFLAGS)
496 pth_detached_CFLAGS = $(AM_CFLAGS)
497 if VGCONF_OS_IS_SOLARIS
498 pth_create_chain_CFLAGS += -D__EXTENSIONS__
499 pth_detached_CFLAGS += -D__EXTENSIONS__
502 tsan_unittest_SOURCES = tsan_unittest.cpp
503 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
504 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
506 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
507 -DENABLE_DRD_CONSISTENCY_CHECKS \
508 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
509 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
511 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
512 unit_vc_LDADD = # nothing, i.e. not -lpthread
515 boost_thread_SOURCES = boost_thread.cpp
516 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
517 boost_thread_LDADD = $(BOOST_LIBS)
520 if HAVE_BUILTIN_ATOMIC
521 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
524 annotate_static_SOURCES = annotate_static.cpp
525 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
527 local_static_SOURCES = local_static.cpp
530 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
531 omp_matinv_LDFLAGS = -fopenmp
532 omp_matinv_LDADD = $(LDADD) -lm
534 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
535 omp_prime_LDFLAGS = -fopenmp
536 omp_prime_LDADD = $(LDADD) -lm
538 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
539 omp_printf_LDFLAGS = -fopenmp
540 omp_printf_LDADD = $(LDADD) -lm
543 matinv_CFLAGS = $(AM_CFLAGS)
544 if VGCONF_OS_IS_SOLARIS
545 matinv_CFLAGS += -D__EXTENSIONS__
547 if HAVE_PTHREAD_BARRIER
548 matinv_LDADD = $(LDADD) -lm
551 rwlock_test_CFLAGS = $(AM_CFLAGS)
552 if VGCONF_OS_IS_SOLARIS
553 rwlock_test_CFLAGS += -D__EXTENSIONS__
556 std_atomic_SOURCES = std_atomic.cpp
557 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
559 std_list_SOURCES = std_list.cpp
560 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
562 std_string_SOURCES = std_string.cpp
563 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
565 # Note: -Wl,--no-as-needed is a workaround for
566 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
568 std_thread_SOURCES = std_thread.cpp
569 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
570 if !VGCONF_OS_IS_SOLARIS
571 std_thread_LDFLAGS = -Wl,--no-as-needed
574 std_thread2_SOURCES = std_thread2.cpp
575 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
576 if !VGCONF_OS_IS_SOLARIS
577 std_thread2_LDFLAGS = -Wl,--no-as-needed
580 sem_wait_SOURCES = sem_wait.cpp