diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-10-30 17:11:20 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-10-30 17:11:20 +0100 |
commit | 24d762d1435257a8efd242c4a1a476c9b2037c03 (patch) | |
tree | d076ae93d9d224035db83b37afe307f7e9b87758 /gcc | |
parent | 1fc5e7ef98e1063953c7a610e99bec2c95b7b010 (diff) | |
download | gcc-24d762d1435257a8efd242c4a1a476c9b2037c03.zip gcc-24d762d1435257a8efd242c4a1a476c9b2037c03.tar.gz gcc-24d762d1435257a8efd242c4a1a476c9b2037c03.tar.bz2 |
testsuite: Avoid TCL errors when rootme or ASAN/TSAN/UBSAN is not avail
gcc/testsuite/
* g++.dg/guality/guality.exp: Skip $rootme-based check if unset.
* gcc.dg/guality/guality.exp: Likewise.
* gfortran.dg/guality/guality.exp: Likewise.
* lib/asan-dg.exp: Don't use $asan_saved_library_path if not set.
* lib/tsan-dg.exp: Don't use $tsan_saved_library_path if not set.
* lib/ubsan-dg.exp: Don't use $ubsan_saved_library_path if not set.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/guality/guality.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/guality/guality.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/guality/guality.exp | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/asan-dg.exp | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/tsan-dg.exp | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/ubsan-dg.exp | 6 |
6 files changed, 15 insertions, 9 deletions
diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp index 33571f1..1d5b65f 100644 --- a/gcc/testsuite/g++.dg/guality/guality.exp +++ b/gcc/testsuite/g++.dg/guality/guality.exp @@ -38,7 +38,7 @@ global GDB if ![info exists ::env(GUALITY_GDB_NAME)] { if [info exists GDB] { set guality_gdb_name "$GDB" - } elseif [file exists $rootme/../gdb/gdb] { + } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } { # If we're doing a combined build, and gdb is available, use it. set guality_gdb_name "$rootme/../gdb/gdb" } else { diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp index 89cd896..ba87132 100644 --- a/gcc/testsuite/gcc.dg/guality/guality.exp +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -38,7 +38,7 @@ global GDB if ![info exists ::env(GUALITY_GDB_NAME)] { if [info exists GDB] { set guality_gdb_name "$GDB" - } elseif [file exists $rootme/../gdb/gdb] { + } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } { # If we're doing a combined build, and gdb is available, use it. set guality_gdb_name "$rootme/../gdb/gdb" } else { diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp index eaa7ae7..0375edf 100644 --- a/gcc/testsuite/gfortran.dg/guality/guality.exp +++ b/gcc/testsuite/gfortran.dg/guality/guality.exp @@ -19,7 +19,7 @@ global GDB if ![info exists ::env(GUALITY_GDB_NAME)] { if [info exists GDB] { set guality_gdb_name "$GDB" - } elseif [file exists $rootme/../gdb/gdb] { + } elseif { [info exists rootme] && [file exists $rootme/../gdb/gdb] } { # If we're doing a combined build, and gdb is available, use it. set guality_gdb_name "$rootme/../gdb/gdb" } else { diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 2124607..ce745df 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -151,8 +151,10 @@ proc asan_finish { args } { unset TEST_ALWAYS_FLAGS } } - set ld_library_path $asan_saved_library_path - set_ld_library_path_env_vars + if [info exists asan_saved_library_path ] { + set ld_library_path $asan_saved_library_path + set_ld_library_path_env_vars + } clear_effective_target_cache } diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp index b5631a7..6dcfd0a 100644 --- a/gcc/testsuite/lib/tsan-dg.exp +++ b/gcc/testsuite/lib/tsan-dg.exp @@ -150,7 +150,9 @@ proc tsan_finish { args } { } else { unset dg-do-what-default } - set ld_library_path $tsan_saved_library_path - set_ld_library_path_env_vars + if [info exists tsan_saved_library_path ] { + set ld_library_path $tsan_saved_library_path + set_ld_library_path_env_vars + } clear_effective_target_cache } diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp index f4ab29e..31740e0 100644 --- a/gcc/testsuite/lib/ubsan-dg.exp +++ b/gcc/testsuite/lib/ubsan-dg.exp @@ -141,7 +141,9 @@ proc ubsan_finish { args } { unset TEST_ALWAYS_FLAGS } } - set ld_library_path $ubsan_saved_library_path - set_ld_library_path_env_vars + if [info exists ubsan_saved_library_path ] { + set ld_library_path $ubsan_saved_library_path + set_ld_library_path_env_vars + } clear_effective_target_cache } |