re PR testsuite/55587 ([ASAN] Testsuite test c-c++-common/asan/memcmp-1.c fails to link on targets without libasan/libsanitizer)

PR testsuite/55587
	* lib/asan-dg.exp (asan_init): Return 1 if libasan has been found,
	0 if not.
	* g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init]
	returned 0.
	* gcc.dg/asan/asan.exp: Likewise.

From-SVN: r194134
This commit is contained in:
Jakub Jelinek 2012-12-04 14:21:11 +01:00 committed by Jakub Jelinek
parent c954bddd5f
commit dfc8400779
4 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2012-12-04 Jakub Jelinek <jakub@redhat.com>
PR testsuite/55587
* lib/asan-dg.exp (asan_init): Return 1 if libasan has been found,
0 if not.
* g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init]
returned 0.
* gcc.dg/asan/asan.exp: Likewise.
2012-12-04 Richard Biener <rguenther@suse.de> 2012-12-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/55124 PR tree-optimization/55124

View File

@ -26,11 +26,13 @@ if ![check_effective_target_faddress_sanitizer] {
# Initialize `dg'. # Initialize `dg'.
dg-init dg-init
asan_init if [asan_init] {
# Main loop. # Main loop.
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] "" gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] ""
}
# All done. # All done.
asan_finish asan_finish
dg-finish dg-finish

View File

@ -28,11 +28,13 @@ if ![check_effective_target_faddress_sanitizer] {
# Initialize `dg'. # Initialize `dg'.
dg-init dg-init
asan_init if [asan_init] {
# Main loop. # Main loop.
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] "" gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] ""
}
# All done. # All done.
asan_finish asan_finish
dg-finish dg-finish

View File

@ -91,6 +91,10 @@ proc asan_init { args } {
set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=address -g" set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=address -g"
} }
} }
if { $link_flags != "" } {
return 1
}
return 0
} }
# #