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 \
113 fp_race.stderr.exp-mips32-be \
114 fp_race.stderr.exp-mips32-le \
116 fp_race2.stderr.exp \
118 fp_race_xml.stderr.exp \
119 fp_race_xml.stderr.exp-mips32-be \
120 fp_race_xml.stderr.exp-mips32-le \
121 fp_race_xml.stderr.exp-solaris \
123 free_is_write.stderr.exp \
124 free_is_write.vgtest \
125 free_is_write2.stderr.exp \
126 free_is_write2.vgtest \
127 hg01_all_ok.stderr.exp \
129 hg02_deadlock.stderr.exp \
130 hg02_deadlock.vgtest \
131 hg03_inherit.stderr.exp \
132 hg03_inherit.vgtest \
133 hg04_race.stderr.exp \
135 hg05_race2.stderr.exp \
136 hg05_race2.stderr.exp-powerpc \
138 hg06_readshared.stderr.exp \
139 hg06_readshared.vgtest \
140 hold_lock_1.stderr.exp \
142 hold_lock_2.stderr.exp \
144 linuxthreads_det.stderr.exp \
145 linuxthreads_det.stderr.exp-linuxthreads \
146 linuxthreads_det.stdout.exp \
147 linuxthreads_det.stdout.exp-linuxthreads \
148 linuxthreads_det.vgtest \
149 local_static.stderr.exp \
150 local_static.vgtest \
154 memory_allocation.stderr.exp \
155 memory_allocation.vgtest \
156 monitor_example.stderr.exp \
157 monitor_example.vgtest \
158 new_delete.stderr.exp \
160 omp_matinv.stderr.exp \
161 omp_matinv.stdout.exp \
163 omp_matinv_racy.stderr.exp \
164 omp_matinv_racy.stdout.exp \
165 omp_matinv_racy.vgtest \
166 omp_prime_racy.stderr.exp \
167 omp_prime_racy.vgtest \
168 omp_printf.stderr.exp \
170 pth_barrier.stderr.exp \
172 pth_barrier2.stderr.exp \
173 pth_barrier2.vgtest \
174 pth_barrier3.stderr.exp \
175 pth_barrier3.vgtest \
176 pth_barrier_race.stderr.exp \
177 pth_barrier_race.vgtest \
178 pth_barrier_reinit.stderr.exp \
179 pth_barrier_reinit.vgtest \
180 pth_barrier_thr_cr.stderr.exp \
181 pth_barrier_thr_cr.vgtest \
182 pth_barrier_thr_cr.supp \
183 pth_broadcast.stderr.exp \
184 pth_broadcast.vgtest \
185 pth_cancel_locked.stderr.exp \
186 pth_cancel_locked.stderr.exp-darwin \
187 pth_cancel_locked.vgtest \
188 pth_cleanup_handler.stderr.exp \
189 pth_cleanup_handler.vgtest \
190 pth_cond_destroy_busy.stderr.exp \
191 pth_cond_destroy_busy.stderr.exp-solaris \
192 pth_cond_destroy_busy.vgtest \
193 pth_cond_race.stderr.exp \
194 pth_cond_race.vgtest \
195 pth_cond_race2.stderr.exp \
196 pth_cond_race2.vgtest \
197 pth_cond_race3.stderr.exp \
198 pth_cond_race3.vgtest \
199 pth_create_chain.stderr.exp \
200 pth_create_chain.vgtest \
201 pth_create_glibc_2_0.stderr.exp \
202 pth_create_glibc_2_0.vgtest \
203 pth_detached.stderr.exp \
204 pth_detached.stdout.exp \
205 pth_detached.vgtest \
206 pth_detached2.stderr.exp \
207 pth_detached2.stdout.exp \
208 pth_detached2.vgtest \
209 pth_detached3.stderr.exp1 \
210 pth_detached3.stderr.exp2 \
211 pth_detached3.vgtest \
212 pth_detached_sem.stderr.exp \
213 pth_detached_sem.stdout.exp \
214 pth_detached_sem.vgtest \
215 pth_inconsistent_cond_wait.stderr.exp1 \
216 pth_inconsistent_cond_wait.stderr.exp2 \
217 pth_inconsistent_cond_wait.vgtest \
218 pth_mutex_reinit.stderr.exp \
219 pth_mutex_reinit.vgtest \
220 pth_once.stderr.exp \
222 pth_process_shared_mutex.stderr.exp \
223 pth_process_shared_mutex.vgtest \
224 pth_spinlock.stderr.exp \
225 pth_spinlock.vgtest \
226 pth_uninitialized_cond.stderr.exp \
227 pth_uninitialized_cond.vgtest \
228 read_and_free_race.stderr.exp \
229 read_and_free_race.vgtest \
230 recursive_mutex.stderr.exp-linux \
231 recursive_mutex.stderr.exp-darwin \
232 recursive_mutex.stderr.exp-solaris \
233 recursive_mutex.vgtest \
234 rwlock_race.stderr.exp \
235 rwlock_race.stderr.exp2 \
237 rwlock_test.stderr.exp \
239 rwlock_type_checking.stderr.exp \
240 rwlock_type_checking.vgtest \
241 sem_as_mutex.stderr.exp \
242 sem_as_mutex.stderr.exp-mips32-be \
243 sem_as_mutex.stderr.exp-mips32-le \
244 sem_as_mutex.vgtest \
245 sem_as_mutex2.stderr.exp \
246 sem_as_mutex2.vgtest \
247 sem_as_mutex3.stderr.exp \
248 sem_as_mutex3.stderr.exp-mips32-be \
249 sem_as_mutex3.stderr.exp-mips32-le \
250 sem_as_mutex3.vgtest \
251 sem_open.stderr.exp \
252 sem_open.stderr.exp-mips32-be \
253 sem_open.stderr.exp-mips32-le \
255 sem_open2.stderr.exp \
257 sem_open3.stderr.exp \
258 sem_open3.stderr.exp-mips32-be \
259 sem_open3.stderr.exp-mips32-le \
261 sem_open_traced.stderr.exp \
262 sem_open_traced.vgtest \
263 sem_wait.stderr.exp \
267 sigaltstack.stderr.exp \
269 std_atomic.stderr.exp \
271 std_list.stderr.exp \
273 std_string.stderr.exp \
275 std_thread.stderr.exp \
277 std_thread2.stderr.exp \
280 str_tester.stderr.exp \
282 tc01_simple_race.stderr.exp \
283 tc01_simple_race.vgtest \
284 tc02_simple_tls.stderr.exp \
285 tc02_simple_tls.vgtest \
286 tc03_re_excl.stderr.exp \
287 tc03_re_excl.vgtest \
288 tc04_free_lock.stderr.exp-x86 \
289 tc04_free_lock.stderr.exp-ppc \
290 tc04_free_lock.stderr.exp-s390 \
291 tc04_free_lock.vgtest \
292 tc05_simple_race.stderr.exp \
293 tc05_simple_race.vgtest \
294 tc06_two_races.stderr.exp \
295 tc06_two_races.vgtest \
296 tc07_hbl1.stderr.exp \
297 tc07_hbl1.stdout.exp \
299 tc08_hbl2.stderr.exp \
300 tc08_hbl2.stdout.exp \
302 tc09_bad_unlock.stderr.exp-x86 \
303 tc09_bad_unlock.stderr.exp-ppc \
304 tc09_bad_unlock.stderr.exp-glibc2.8 \
305 tc09_bad_unlock.stderr.exp-s390 \
306 tc09_bad_unlock.stderr.exp-solaris \
307 tc09_bad_unlock.vgtest \
308 tc10_rec_lock.stderr.exp \
309 tc10_rec_lock.vgtest \
310 tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \
312 tc12_rwl_trivial.stderr.exp \
313 tc12_rwl_trivial.vgtest \
314 tc13_laog1.stderr.exp \
316 tc15_laog_lockdel.stderr.exp \
317 tc15_laog_lockdel.vgtest \
318 tc16_byterace.stderr.exp \
319 tc16_byterace.vgtest \
320 tc17_sembar.stderr.exp \
322 tc18_semabuse.stderr.exp \
323 tc18_semabuse.stderr.exp-solaris \
324 tc18_semabuse.vgtest \
325 tc19_shadowmem.stderr.exp-32bit \
326 tc19_shadowmem.stderr.exp-32bit-BE \
327 tc19_shadowmem.stderr.exp-64bit \
328 tc19_shadowmem.vgtest \
329 tc21_pthonce.stderr.exp \
330 tc21_pthonce.stdout.exp \
331 tc21_pthonce.vgtest \
332 tc22_exit_w_lock.stderr.exp-32bit \
333 tc22_exit_w_lock.stderr.exp-64bit \
334 tc22_exit_w_lock.vgtest \
335 tc23_bogus_condwait.stderr.exp-linux-x86 \
336 tc23_bogus_condwait.stderr.exp-linux-ppc \
337 tc23_bogus_condwait.stderr.exp-darwin-x86 \
338 tc23_bogus_condwait.stderr.exp-darwin-amd64 \
339 tc23_bogus_condwait.vgtest \
340 tc24_nonzero_sem.stderr.exp \
341 tc24_nonzero_sem.vgtest \
342 thread_name.stderr.exp \
344 thread_name_xml.stderr.exp \
345 thread_name_xml.vgtest \
346 threaded-fork.stderr.exp \
347 threaded-fork.vgtest \
348 threaded-fork-vcs.stderr.exp \
349 threaded-fork-vcs.vgtest \
350 tls_threads.stderr.exp \
354 unit_bitmap.stderr.exp \
364 annotate_ignore_write \
365 annotate_publish_hg \
367 annotate_trace_memory \
384 pth_cleanup_handler \
385 pth_cond_destroy_busy \
391 pth_inconsistent_cond_wait \
393 pth_process_shared_mutex \
394 pth_uninitialized_cond \
398 rwlock_type_checking \
408 check_PROGRAMS += boost_thread
411 if HAVE_BUILTIN_ATOMIC
420 if HAVE_BUILTIN_ATOMIC_CXX
422 annotate_smart_pointer \
426 # clang 3.3 will generate errors about libstdc++ headers from
427 # gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
428 if CXX_CAN_INCLUDE_THREAD_HEADER
429 if HAVE_SHARED_POINTER_ANNOTATION
440 check_PROGRAMS += omp_matinv omp_prime omp_printf
443 if HAVE_PTHREAD_BARRIER
454 if HAVE_PTHREAD_CREATE_GLIBC_2_0
455 check_PROGRAMS += pth_create_glibc_2_0
458 if HAVE_PTHREAD_SPINLOCK
459 check_PROGRAMS += pth_spinlock
462 if !VGCONF_OS_IS_DARWIN
463 check_PROGRAMS += sem_wait
467 AM_CFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ -Wno-inline -Wno-unused-parameter
468 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @FLAG_W_EXTRA@ @FLAG_FALIGNED_NEW@ \
469 -Wno-inline -Wno-unused-parameter
474 bug322621_SOURCES = bug322621.cpp
475 concurrent_close_SOURCES = concurrent_close.cpp
476 dlopen_main_LDADD = -ldl
477 dlopen_lib_so_SOURCES = dlopen_lib.c
478 dlopen_lib_so_CFLAGS = -fPIC
479 dlopen_lib_so_LDFLAGS = -shared -fPIC
480 monitor_example_SOURCES = monitor_example.cpp
481 new_delete_SOURCES = new_delete.cpp
482 new_delete_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@
484 free_is_write_CFLAGS = $(AM_CFLAGS)
485 pth_barrier_CFLAGS = $(AM_CFLAGS)
486 if VGCONF_OS_IS_SOLARIS
487 free_is_write_CFLAGS += -D__EXTENSIONS__
488 pth_barrier_CFLAGS += -D__EXTENSIONS__
491 pth_create_chain_CFLAGS = $(AM_CFLAGS)
492 pth_detached_CFLAGS = $(AM_CFLAGS)
493 if VGCONF_OS_IS_SOLARIS
494 pth_create_chain_CFLAGS += -D__EXTENSIONS__
495 pth_detached_CFLAGS += -D__EXTENSIONS__
498 tsan_unittest_SOURCES = tsan_unittest.cpp
499 tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \
500 -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"'
502 unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
503 -DENABLE_DRD_CONSISTENCY_CHECKS \
504 @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
505 unit_bitmap_LDADD = # nothing, i.e. not -lpthread
507 unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
508 unit_vc_LDADD = # nothing, i.e. not -lpthread
511 boost_thread_SOURCES = boost_thread.cpp
512 boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
513 boost_thread_LDADD = $(BOOST_LIBS)
516 if HAVE_BUILTIN_ATOMIC
517 annotate_smart_pointer_SOURCES = annotate_smart_pointer.cpp
520 annotate_static_SOURCES = annotate_static.cpp
521 annotate_static_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_UNUSED_FUNCTION@
523 local_static_SOURCES = local_static.cpp
526 omp_matinv_CFLAGS = $(AM_CFLAGS) -fopenmp
527 omp_matinv_LDFLAGS = -fopenmp
528 omp_matinv_LDADD = $(LDADD) -lm
530 omp_prime_CFLAGS = $(AM_CFLAGS) -fopenmp
531 omp_prime_LDFLAGS = -fopenmp
532 omp_prime_LDADD = $(LDADD) -lm
534 omp_printf_CFLAGS = $(AM_CFLAGS) -fopenmp
535 omp_printf_LDFLAGS = -fopenmp
536 omp_printf_LDADD = $(LDADD) -lm
539 matinv_CFLAGS = $(AM_CFLAGS)
540 if VGCONF_OS_IS_SOLARIS
541 matinv_CFLAGS += -D__EXTENSIONS__
543 if HAVE_PTHREAD_BARRIER
544 matinv_LDADD = $(LDADD) -lm
547 rwlock_test_CFLAGS = $(AM_CFLAGS)
548 if VGCONF_OS_IS_SOLARIS
549 rwlock_test_CFLAGS += -D__EXTENSIONS__
552 std_atomic_SOURCES = std_atomic.cpp
553 std_atomic_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
555 std_list_SOURCES = std_list.cpp
556 std_list_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
558 std_string_SOURCES = std_string.cpp
559 std_string_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x -Wno-sign-compare
561 # Note: -Wl,--no-as-needed is a workaround for
562 # https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
564 std_thread_SOURCES = std_thread.cpp
565 std_thread_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
566 if !VGCONF_OS_IS_SOLARIS
567 std_thread_LDFLAGS = -Wl,--no-as-needed
570 std_thread2_SOURCES = std_thread2.cpp
571 std_thread2_CXXFLAGS = $(AM_CXXFLAGS) -std=c++0x
572 if !VGCONF_OS_IS_SOLARIS
573 std_thread2_LDFLAGS = -Wl,--no-as-needed
576 sem_wait_SOURCES = sem_wait.cpp