diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2013-06-17 19:22:10 +1000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2013-06-17 19:22:10 +1000 |
commit | 5481f29161477520c691d525653323b82fa47ad7 (patch) | |
tree | a2b8516f22fc55175e4f2d512835a5f186189801 /runtest.exp | |
parent | b97cf09cd7b79d87b4ecfa064657140e25a8958e (diff) | |
download | dejagnu-5481f29161477520c691d525653323b82fa47ad7.zip dejagnu-5481f29161477520c691d525653323b82fa47ad7.tar.gz dejagnu-5481f29161477520c691d525653323b82fa47ad7.tar.bz2 |
* runtest.exp (libdirs): New global variable.
(load_lib): Append libdirs to search_and_load_files directories.
* doc/ref.xml (load_lib): Document global variable libdirs.
* doc/dejagnu.texi: Regenerate.
* testsuite/runtest.all/load_lib.exp: New testcase.
* Makefile.am (TESTSUITE_FILES): Add new testcase.
* Makefile.in: Regenerate.
Signed-off-by: Ben Elliston <bje@gnu.org>
Diffstat (limited to 'runtest.exp')
-rw-r--r-- | runtest.exp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtest.exp b/runtest.exp index 78da782..bd39dd8 100644 --- a/runtest.exp +++ b/runtest.exp @@ -589,7 +589,7 @@ proc lookfor_file { dir name } { # source tree, (up one or two levels), then in the current dir. # proc load_lib { file } { - global verbose libdir srcdir base_dir execpath tool + global verbose libdir libdirs srcdir base_dir execpath tool global loaded_libs if {[info exists loaded_libs($file)]} { @@ -597,8 +597,11 @@ proc load_lib { file } { } set loaded_libs($file) "" - - if { [search_and_load_file "library file" $file [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]] == 0 } { + 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 + } + if { [search_and_load_file "library file" $file $search_dirs ] == 0 } { send_error "ERROR: Couldn't find library file $file.\n" exit 1 } @@ -652,6 +655,8 @@ set libdir [file dirname $execpath]/dejagnu if {[info exists env(DEJAGNULIBS)]} { set libdir $env(DEJAGNULIBS) } +# list of extra search directories used by load_lib to look for libs +set libdirs {} verbose "Using $libdir to find libraries" |