[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: add search path for tool init file (part of fix for Automake misi
From: |
Jacob Bachmeyer |
Subject: |
PATCH: add search path for tool init file (part of fix for Automake misintegration) |
Date: |
Wed, 14 Nov 2018 21:50:20 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0 |
This patch fixes the problem of the first "make check" after running
configure complaining about being unable to find tool init files that I
have previously described.
ChangeLog entry
--
* runtest.exp (load_lib): Clean up whitespace.
(load_tool_init): Search for tool init file instead of assuming
exactly one location. Backwards compatibility is maintained.
--
Patch attached due to whitespace issues.
-- Jacob
diff --git a/runtest.exp b/runtest.exp
index 84e3e6b..5ced8ab 100644
--- a/runtest.exp
+++ b/runtest.exp
@@ -596,7 +596,7 @@ proc load_lib { file } {
set loaded_libs($file) ""
set search_dirs [list ../lib $libdir $libdir/lib [file dirname [file
dirname $srcdir]]/dejagnu/lib $srcdir/lib $execpath/lib . [file dirname [file
dirname [file dirname $srcdir]]]/dejagnu/lib]
if {[info exists libdirs]} {
- lappend search_dirs $libdirs
+ lappend search_dirs $libdirs
}
if { [search_and_load_file "library file" $file $search_dirs ] == 0 } {
send_error "ERROR: Couldn't find library file $file.\n"
@@ -929,25 +929,21 @@ proc load_tool_init { file } {
global srcdir
global loaded_libs
- if {[info exists loaded_libs($file)]} {
+ if {[info exists loaded_libs(tool/$file)]} {
return
}
- set loaded_libs($file) ""
-
- verbose "Looking for tool init file $srcdir/lib/$file"
+ set loaded_libs(tool/$file) ""
- if {[file exists [file join ${srcdir} lib $file]]} {
- verbose "Loading library file ${srcdir}/lib/$file"
- if { [catch "uplevel #0 source ${srcdir}/lib/$file"] == 1 } {
- send_error "ERROR: tcl error sourcing library file
${srcdir}/lib/$file.\n"
- global errorInfo
- if {[info exists errorInfo]} {
- send_error "$errorInfo\n"
- }
- exit 1
- }
+ if { [lindex [file split $srcdir] end] != "testsuite" } {
+ lappend searchpath [file join $srcdir testsuite lib tool]
+ lappend searchpath [file join $srcdir testsuite lib]
} else {
+ lappend searchpath [file join $srcdir lib tool]
+ }
+ lappend searchpath [file join $srcdir lib]
+
+ if { ![search_and_load_file "tool init file" [list $file] $searchpath] } {
warning "Couldn't find tool init file"
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- PATCH: add search path for tool init file (part of fix for Automake misintegration),
Jacob Bachmeyer <=