Browse Source

* runtest.exp (search_and_load_file): Join the directory and

filename once using 'file join'.

Signed-off-by: Ben Elliston <bje@gnu.org>
psql
Andrew Burgess 8 years ago
committed by Ben Elliston
parent
commit
df67223e4b
  1. 5
      ChangeLog
  2. 13
      runtest.exp

5
ChangeLog

@ -1,3 +1,8 @@
2019-03-08 Andrew Burgess <andrew.burgess@embecosm.com>
* runtest.exp (search_and_load_file): Join the directory and
filename once using 'file join'.
2019-01-24 Jacob Bachmeyer <jcb62281@gmail.com>
* doc/dejagnu.texi: Refill paragraphs and normalize inter-sentence

13
runtest.exp

@ -328,18 +328,19 @@ proc search_and_load_file { type filelist dirlist } {
foreach dir $dirlist {
foreach initfile $filelist {
verbose "Looking for $type $dir/$initfile" 2
if {[file exists [file join $dir $initfile]]} {
set filename [file join $dir $initfile]
verbose "Looking for $type $filename" 2
if {[file exists $filename]} {
set found 1
set error ""
if { $type ne "library file" } {
send_user "Using $dir/$initfile as $type.\n"
send_user "Using $filename as $type.\n"
} else {
verbose "Loading $dir/$initfile"
verbose "Loading $filename"
}
if {[catch "uplevel #0 source $dir/$initfile" error] == 1} {
if {[catch "uplevel #0 source $filename" error] == 1} {
global errorInfo
send_error "ERROR: tcl error sourcing $type $dir/$initfile.\n$error\n"
send_error "ERROR: tcl error sourcing $type $filename.\n$error\n"
if {[info exists errorInfo]} {
send_error "$errorInfo\n"
}

Loading…
Cancel
Save