aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2018-12-09 18:41:26 +1100
committerBen Elliston <bje@gnu.org>2018-12-09 18:41:26 +1100
commite2fb9266669c87021ce666f8dca81ab2d96635d1 (patch)
tree5671da3e54579106914421e932611f057eedc78d /lib
parent115a81dab7063ea3b806bfbac87845e32d8ca5ad (diff)
downloaddejagnu-e2fb9266669c87021ce666f8dca81ab2d96635d1.zip
dejagnu-e2fb9266669c87021ce666f8dca81ab2d96635d1.tar.gz
dejagnu-e2fb9266669c87021ce666f8dca81ab2d96635d1.tar.bz2
* baseboards/basic-sid.exp, baseboards/basic-sim.exp,
baseboards/i386-sid.exp, baseboards/mt-sid.exp, baseboards/sh-sid.exp, config/adb.exp, config/gdb-comm.exp, config/gdb_stub.exp, config/sim.exp, config/unix.exp, config/vxworks.exp, lib/dejagnu.exp, lib/dg.exp, lib/framework.exp, lib/kermit.exp, lib/libgloss.exp, lib/remote.exp, lib/rsh.exp, lib/target.exp, lib/tip.exp, lib/utils.exp, testsuite/lib/libsup.exp, testsuite/runtest.all/options.exp,: Remove unnecessary braces around variable expansions.
Diffstat (limited to 'lib')
-rw-r--r--lib/dejagnu.exp6
-rw-r--r--lib/dg.exp2
-rw-r--r--lib/framework.exp10
-rw-r--r--lib/kermit.exp14
-rw-r--r--lib/libgloss.exp166
-rw-r--r--lib/remote.exp34
-rw-r--r--lib/rsh.exp6
-rw-r--r--lib/target.exp14
-rw-r--r--lib/tip.exp12
-rw-r--r--lib/utils.exp50
10 files changed, 157 insertions, 157 deletions
diff --git a/lib/dejagnu.exp b/lib/dejagnu.exp
index 8d438f1..237d9d6 100644
--- a/lib/dejagnu.exp
+++ b/lib/dejagnu.exp
@@ -94,7 +94,7 @@ proc host_compile {compline} {
}
# return the filtered output
- return ${comp_output}
+ return $comp_output
}
# Execute the executable file, and analyse the output for the test
@@ -121,7 +121,7 @@ proc host_execute {args} {
}
verbose "The executable is $executable" 2
- if {![file exists ${executable}]} {
+ if {![file exists $executable]} {
perror "The executable, \"$executable\" is missing" 0
return "No source file found"
}
@@ -129,7 +129,7 @@ proc host_execute {args} {
# spawn the executable and look for the DejaGnu output messages from the
# test case.
# spawn -noecho -open [open "|./${executable}" "r"]
- spawn -noecho "./${executable}" ${params}
+ spawn -noecho "./${executable}" $params
set prefix "\[^\r\n\]*"
expect {
-re "^$prefix\[0-9\]\[0-9\]:..:..:${text}*\r\n" {
diff --git a/lib/dg.exp b/lib/dg.exp
index 7903942..68c63a3 100644
--- a/lib/dg.exp
+++ b/lib/dg.exp
@@ -813,7 +813,7 @@ proc dg-test { args } {
setup_xfail "*-*-*"
}
set texttmp [lindex ${dg-output-text} 1]
- if { ![regexp -- $texttmp ${output}] } {
+ if { ![regexp -- $texttmp $output] } {
fail "$name output pattern test"
send_log "Output was:\n${output}\nShould match:\n$texttmp\n"
verbose "Failed test for output pattern $texttmp" 3
diff --git a/lib/framework.exp b/lib/framework.exp
index 57f65d3..bf9823f 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -57,7 +57,7 @@ proc open_logs { } {
global xml_file
global xml
- if { ${tool} eq "" } {
+ if { $tool eq "" } {
set tool testrun
}
catch "file delete -force -- $outdir/$tool.sum"
@@ -72,7 +72,7 @@ proc open_logs { } {
catch "file delete -force -- $outdir/$tool.log"
log_file -a $outdir/$tool.log
verbose "Opening log files in $outdir"
- if { ${tool} == "testrun" } {
+ if { $tool == "testrun" } {
set tool ""
}
fconfigure $sum_file -buffering line
@@ -101,7 +101,7 @@ proc isbuild { { pattern "" } } {
global host_triplet
if {![info exists build_triplet]} {
- set build_triplet ${host_triplet}
+ set build_triplet $host_triplet
}
if {$pattern eq ""} {
return $build_triplet
@@ -183,7 +183,7 @@ proc is3way {} {
global build_triplet
if {![info exists build_triplet]} {
- set build_triplet ${host_triplet}
+ set build_triplet $host_triplet
}
verbose "Checking $host_triplet against $build_triplet" 2
if { $build_triplet eq $host_triplet } {
@@ -357,7 +357,7 @@ proc log_and_exit {} {
close_logs
verbose -log "runtest completed at [timestamp -format %c]"
if {$mail_logs} {
- if { ${tool} eq "" } {
+ if { $tool eq "" } {
set tool testrun
}
mail_file $outdir/$tool.sum $mailing_list "Dejagnu Summary Log"
diff --git a/lib/kermit.exp b/lib/kermit.exp
index db604a2..6d06969 100644
--- a/lib/kermit.exp
+++ b/lib/kermit.exp
@@ -29,15 +29,15 @@ proc kermit_open {dest args} {
if {[board_info $dest exists name]} {
set dest [board_info $dest name]
}
- if {[board_info ${dest} exists serial]} {
- set port [board_info ${dest} serial]
- set device "-l [board_info ${dest} serial]"
- if {[board_info ${dest} exists baud]} {
- append device " -b [board_info ${dest} baud]"
+ if {[board_info $dest exists serial]} {
+ set port [board_info $dest serial]
+ set device "-l [board_info $dest serial]"
+ if {[board_info $dest exists baud]} {
+ append device " -b [board_info $dest baud]"
}
} else {
- set port [board_info ${dest} netport]
- set device "-j [board_info ${dest} netport]"
+ set port [board_info $dest netport]
+ set device "-j [board_info $dest netport]"
}
set tries 0
diff --git a/lib/libgloss.exp b/lib/libgloss.exp
index ac971c6..16b6fc4 100644
--- a/lib/libgloss.exp
+++ b/lib/libgloss.exp
@@ -81,7 +81,7 @@ proc libgloss_link_flags { args } {
set gloss_srcdir ""
# look for the libgloss srcdir sp we can find the linker scripts
- set gloss_srcdir [lookfor_file ${srcdir} libgloss/$cpu]
+ set gloss_srcdir [lookfor_file $srcdir libgloss/$cpu]
# set the proper paths for gcc if the target subdir exists, else assume we
# have no libgloss support for this target.
@@ -119,7 +119,7 @@ proc newlib_link_flags { args } {
return ""
}
- set ld_script_path [lookfor_file ${tool_root_dir} "ld/ldscripts"]
+ set ld_script_path [lookfor_file $tool_root_dir "ld/ldscripts"]
if { $ld_script_path ne "" } {
set result "-L[file dirname $ld_script_path]"
} else {
@@ -154,9 +154,9 @@ proc newlib_include_flags { args } {
if {[file exists [file join $gccpath newlib]]} {
verbose "Newlib path is $gccpath/newlib"
- set newlib_dir [lookfor_file ${srcdir} newlib/libc/include/assert.h]
- if { ${newlib_dir} ne "" } {
- set newlib_dir [file dirname ${newlib_dir}]
+ set newlib_dir [lookfor_file $srcdir newlib/libc/include/assert.h]
+ if { $newlib_dir ne "" } {
+ set newlib_dir [file dirname $newlib_dir]
}
# Note - we use -isystem rather than -I because newlib contains
# system header files. This is especially important for the
@@ -164,7 +164,7 @@ proc newlib_include_flags { args } {
# #include_next will generate error messages from GCC if compiling
# in strict ANSI mode or if another limits.h header cannot be found.
# When it is included via -isystem these things do not happen.
- return " -isystem $gccpath/newlib/targ-include -isystem ${newlib_dir}"
+ return " -isystem $gccpath/newlib/targ-include -isystem $newlib_dir"
} else {
verbose "No newlib support for this target"
}
@@ -184,24 +184,24 @@ proc libio_include_flags { args } {
set gccpath $tool_root_dir
}
- set libio_bin_dir [lookfor_file ${gccpath} libio/_G_config.h]
+ set libio_bin_dir [lookfor_file $gccpath libio/_G_config.h]
# linux doesn't build _G_config.h and the test above fails, so
# we search for iostream.list too.
if { $libio_bin_dir eq "" } {
- set libio_bin_dir [lookfor_file ${gccpath} libio/iostream.list]
+ set libio_bin_dir [lookfor_file $gccpath libio/iostream.list]
}
- set libio_src_dir [lookfor_file ${srcdir} libio/Makefile.in]
+ set libio_src_dir [lookfor_file $srcdir libio/Makefile.in]
if { $libio_bin_dir ne "" && $libio_src_dir ne "" } {
- set libio_src_dir [file dirname ${libio_src_dir}]
- set libio_bin_dir [file dirname ${libio_bin_dir}]
+ set libio_src_dir [file dirname $libio_src_dir]
+ set libio_bin_dir [file dirname $libio_bin_dir]
# Note - unlike the newlib_include_flags proc above we use the -I
# switch to specify the include paths. This is because these headers
# are not system headers, and if -isystem were to be used GCC would
# generate an implicit extern "C" { ... } surrounding them. This
# will break targets which do not define NO_IMPLICIT_EXTERN_C.
- return " -I${libio_src_dir} -I${libio_bin_dir}"
+ return " -I$libio_src_dir -I$libio_bin_dir"
} else {
return ""
}
@@ -214,9 +214,9 @@ proc libio_link_flags { args } {
set gccpath "[get_multilibs]"
- set libio_dir [lookfor_file ${gccpath} libio/libio.a]
+ set libio_dir [lookfor_file $gccpath libio/libio.a]
if { $libio_dir ne "" } {
- return "-L[file dirname ${libio_dir}]"
+ return "-L[file dirname $libio_dir]"
} else {
return ""
}
@@ -234,25 +234,25 @@ proc g++_include_flags { args } {
set libio_dir ""
set flags ""
- set dir [lookfor_file ${srcdir} libg++]
- if { ${dir} ne "" } {
+ set dir [lookfor_file $srcdir libg++]
+ if { $dir ne "" } {
# See comment in libio_include_flags about using -I.
- append flags " -I${dir} -I${dir}/src"
+ append flags " -I$dir -I$dir/src"
}
- set dir [lookfor_file ${srcdir} libstdc++-v3]
- if { ${dir} ne "" } {
- append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++"
+ set dir [lookfor_file $srcdir libstdc++-v3]
+ if { $dir ne "" } {
+ append flags " -I$dir/include -I$dir/include/std -I$dir/include/c_std -I$dir/libsupc++"
}
- set dir [lookfor_file ${gccpath} libstdc++-v3]
- if { ${dir} ne "" } {
- append flags " -I${dir}/include -I${dir}/include/${target_alias}"
+ set dir [lookfor_file $gccpath libstdc++-v3]
+ if { $dir ne "" } {
+ append flags " -I$dir/include -I$dir/include/$target_alias"
}
- set dir [lookfor_file ${srcdir} libstdc++]
- if { ${dir} ne "" } {
- append flags " -I${dir} -I${dir}/stl"
+ set dir [lookfor_file $srcdir libstdc++]
+ if { $dir ne "" } {
+ append flags " -I$dir -I$dir/stl"
}
return $flags
@@ -268,47 +268,47 @@ proc g++_link_flags { args } {
set ld_library_path "."
if { $gccpath ne "" } {
- if {[file exists [file join ${gccpath} lib libstdc++.a]]} {
- append ld_library_path ":${gccpath}/lib"
+ if {[file exists [file join $gccpath lib libstdc++.a]]} {
+ append ld_library_path ":$gccpath/lib"
}
- if {[file exists [file join ${gccpath} libg++ libg++.a]]} {
- append flags "-L${gccpath}/libg++ "
- append ld_library_path ":${gccpath}/libg++"
+ if {[file exists [file join $gccpath libg++ libg++.a]]} {
+ append flags "-L$gccpath/libg++ "
+ append ld_library_path ":$gccpath/libg++"
}
- if {[file exists [file join ${gccpath} libstdc++ libstdc++.a]]} {
- append flags "-L${gccpath}/libstdc++ "
- append ld_library_path ":${gccpath}/libstdc++"
+ if {[file exists [file join $gccpath libstdc++ libstdc++.a]]} {
+ append flags "-L$gccpath/libstdc++ "
+ append ld_library_path ":$gccpath/libstdc++"
}
- if {[file exists [file join ${gccpath} libstdc++-v3 src .libs libstdc++.a]]} {
- append flags "-L${gccpath}/libstdc++-v3/src/.libs "
- append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
+ if {[file exists [file join $gccpath libstdc++-v3 src .libs libstdc++.a]]} {
+ append flags "-L$gccpath/libstdc++-v3/src/.libs "
+ append ld_library_path ":$gccpath/libstdc++-v3/src/.libs"
}
- if {[file exists [file join ${gccpath} libiberty libiberty.a]]} {
- append flags "-L${gccpath}/libiberty "
+ if {[file exists [file join $gccpath libiberty libiberty.a]]} {
+ append flags "-L$gccpath/libiberty "
}
- if {[file exists [file join ${gccpath} librx librx.a]]} {
- append flags "-L${gccpath}/librx "
+ if {[file exists [file join $gccpath librx librx.a]]} {
+ append flags "-L$gccpath/librx "
}
} else {
global tool_root_dir
- set libgpp [lookfor_file ${tool_root_dir} libg++]
+ set libgpp [lookfor_file $tool_root_dir libg++]
if { $libgpp ne "" } {
- append flags "-L${libgpp} "
- append ld_library_path ":${libgpp}"
+ append flags "-L$libgpp "
+ append ld_library_path ":$libgpp"
}
- set libstdcpp [lookfor_file ${tool_root_dir} libstdc++]
+ set libstdcpp [lookfor_file $tool_root_dir libstdc++]
if { $libstdcpp ne "" } {
- append flags "-L${libstdcpp} "
- append ld_library_path ":${libstdcpp}"
+ append flags "-L$libstdcpp "
+ append ld_library_path ":$libstdcpp"
}
- set libiberty [lookfor_file ${tool_root_dir} libiberty]
+ set libiberty [lookfor_file $tool_root_dir libiberty]
if { $libiberty ne "" } {
- append flags "-L${libiberty} "
+ append flags "-L$libiberty "
}
- set librx [lookfor_file ${tool_root_dir} librx]
+ set librx [lookfor_file $tool_root_dir librx]
if { $librx ne "" } {
- append flags "-L${librx} "
+ append flags "-L$librx "
}
}
return $flags
@@ -326,22 +326,22 @@ proc libstdc++_include_flags { args } {
set libio_dir ""
set flags ""
- set dir [lookfor_file ${srcdir} libstdc++-v3]
- if { ${dir} ne "" } {
+ set dir [lookfor_file $srcdir libstdc++-v3]
+ if { $dir ne "" } {
# See comment in libio_include_flags about using -I.
- append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++"
+ append flags " -I$dir/include -I$dir/include/std -I$dir/include/c_std -I$dir/libsupc++"
}
set gccpath [get_multilibs]
- set dir [lookfor_file ${gccpath} libstdc++-v3]
- if { ${dir} ne "" } {
- append flags " -I${dir}/include -I${dir}/include/${target_alias}"
+ set dir [lookfor_file $gccpath libstdc++-v3]
+ if { $dir ne "" } {
+ append flags " -I$dir/include -I$dir/include/$target_alias"
}
- set dir [lookfor_file ${srcdir} libstdc++]
- if { ${dir} ne "" } {
- append flags " -I${dir} -I${dir}/stl"
+ set dir [lookfor_file $srcdir libstdc++]
+ if { $dir ne "" } {
+ append flags " -I$dir -I$dir/stl"
}
return $flags
@@ -356,31 +356,31 @@ proc libstdc++_link_flags { args } {
set flags ""
if { $gccpath ne "" } {
- if {[file exists [file join ${gccpath} libstdc++ libstdc++.a]]} {
- append flags "-L${gccpath}/libstdc++ "
- append ld_library_path ":${gccpath}/libstdc++"
+ if {[file exists [file join $gccpath libstdc++ libstdc++.a]]} {
+ append flags "-L$gccpath/libstdc++ "
+ append ld_library_path ":$gccpath/libstdc++"
}
- if {[file exists [file join ${gccpath} libiberty libiberty.a]]} {
- append flags "-L${gccpath}/libiberty "
+ if {[file exists [file join $gccpath libiberty libiberty.a]]} {
+ append flags "-L$gccpath/libiberty "
}
- if {[file exists [file join ${gccpath} librx librx.a]]} {
- append flags "-L${gccpath}/librx "
+ if {[file exists [file join $gccpath librx librx.a]]} {
+ append flags "-L$gccpath/librx "
}
} else {
global tool_root_dir
- set libstdcpp [lookfor_file ${tool_root_dir} libstdc++]
+ set libstdcpp [lookfor_file $tool_root_dir libstdc++]
if { $libstdcpp ne "" } {
- append flags "-L${libstdcpp} "
- append ld_library_path ":${libstdcpp}"
+ append flags "-L$libstdcpp "
+ append ld_library_path ":$libstdcpp"
}
- set libiberty [lookfor_file ${tool_root_dir} libiberty]
+ set libiberty [lookfor_file $tool_root_dir libiberty]
if { $libiberty ne "" } {
- append flags "-L${libiberty} "
+ append flags "-L$libiberty "
}
- set librx [lookfor_file ${tool_root_dir} librx]
+ set librx [lookfor_file $tool_root_dir librx]
if { $librx ne "" } {
- append flags "-L${librx} "
+ append flags "-L$librx "
}
}
return $flags
@@ -501,7 +501,7 @@ proc get_multilibs { args } {
if { $multitop eq "" } {
set multitop [lookfor_file $comp_base_dir "libraries"]
if { $multitop eq "" } {
- set multitop "[lookfor_file ${comp_base_dir} gcc/xgcc]"
+ set multitop "[lookfor_file $comp_base_dir gcc/xgcc]"
if { $multitop ne "" } {
set multitop [file dirname [file dirname $multitop]]
} else {
@@ -609,13 +609,13 @@ proc find_binutils_prog { name } {
set file [lookfor_file $tool_root_dir $name]
if { $file eq "" } {
- set file [lookfor_file $tool_root_dir ${name}-new]
+ set file [lookfor_file $tool_root_dir $name-new]
}
if { $file eq "" } {
set file [lookfor_file $tool_root_dir binutils/$name]
}
if { $file eq "" } {
- set file [lookfor_file $tool_root_dir binutils/${name}-new]
+ set file [lookfor_file $tool_root_dir binutils/$name-new]
}
if { $file ne "" } {
set NAME $file
@@ -919,8 +919,8 @@ proc build_wrapper { gluefile } {
if {[target_info exists wrap_compile_flags]} {
lappend flags "additional_flags=[target_info wrap_compile_flags]"
}
- if { [target_compile ${libdir}/testglue.c ${gluefile} object $flags] eq "" } {
- set gluefile [remote_download host ${gluefile} ${tool}_tg.o]
+ if { [target_compile $libdir/testglue.c $gluefile object $flags] eq "" } {
+ set gluefile [remote_download host $gluefile ${tool}_tg.o]
return [list $gluefile $result]
} else {
return ""
@@ -944,11 +944,11 @@ proc winsup_include_flags { args } {
if {[file exists [file join $gccpath winsup]]} {
verbose "Winsup path is $gccpath/winsup"
- set winsup_dir [lookfor_file ${srcdir} winsup/include/windows.h]
- if { ${winsup_dir} ne "" } {
- set winsup_dir [file dirname ${winsup_dir}]
+ set winsup_dir [lookfor_file $srcdir winsup/include/windows.h]
+ if { $winsup_dir ne "" } {
+ set winsup_dir [file dirname $winsup_dir]
# See comment in libio_include_flags about using -I.
- return " -I${winsup_dir}"
+ return " -I$winsup_dir"
}
}
verbose "No winsup support for this target"
diff --git a/lib/remote.exp b/lib/remote.exp
index 9185c29..0e5bad2 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -188,9 +188,9 @@ proc local_exec { commandline inp outp timeout } {
}
# Why do we use tee? Because open can't redirect both input and output.
if { $use_tee } {
- set result [catch {open "| ${commandline} $inp |& tee $outpf" RDONLY} id]
+ set result [catch {open "| $commandline $inp |& tee $outpf" RDONLY} id]
} else {
- set result [catch {open "| ${commandline} $inp $outp" $mode} id]
+ set result [catch {open "| $commandline $inp $outp" $mode} id]
}
if { $result != 0 } {
@@ -362,15 +362,15 @@ proc remote_raw_close { host } {
proc standard_close { host } {
global board_info
- if {[board_info ${host} exists fileid]} {
- set shell_id [board_info ${host} fileid]
+ if {[board_info $host exists fileid]} {
+ set shell_id [board_info $host fileid]
set pid -1
verbose "Closing the remote shell $shell_id" 2
- if {[board_info ${host} exists fileid_origid]} {
- set oid [board_info ${host} fileid_origid]
+ if {[board_info $host exists fileid_origid]} {
+ set oid [board_info $host fileid_origid]
set pid [pid $oid]
- unset board_info(${host},fileid_origid)
+ unset board_info($host,fileid_origid)
} else {
set result [catch "exp_pid -i $shell_id" pid]
if { $result != 0 || $pid <= 0 } {
@@ -387,7 +387,7 @@ proc standard_close { host } {
catch "close $oid"
}
- unset board_info(${host},fileid)
+ unset board_info($host,fileid)
verbose "Shell closed."
}
return 0
@@ -410,7 +410,7 @@ proc remote_raw_binary { host } {
# success and 0 on failure.
#
proc remote_reboot { host } {
- clone_output "\nRebooting ${host}\n"
+ clone_output "\nRebooting $host\n"
# FIXME: don't close the host connection, or all the remote
# procedures will fail.
# remote_close $host
@@ -637,7 +637,7 @@ proc call_remote { type proc dest args } {
}
return $result
}
- foreach try "${high_prot} [board_info $dest file_transfer] [board_info $dest connect] telnet standard" {
+ foreach try "$high_prot [board_info $dest file_transfer] [board_info $dest connect] telnet standard" {
verbose "looking for ${try}_${proc}" 4
if { $try ne "" } {
if { [info procs "${try}_${proc}"] ne "" } {
@@ -864,12 +864,12 @@ proc remote_spawn { dest commandline args } {
if { [llength $args] > 0 } {
if { [lindex $args 0] eq "readonly" } {
- set result [catch { open "| ${commandline} |& cat" "r" } id]
+ set result [catch { open "| $commandline |& cat" "r" } id]
if { $result != 0 } {
return -1
}
} else {
- set result [catch {open "| ${commandline}" "w"} id]
+ set result [catch {open "| $commandline" "w"} id]
if { $result != 0 } {
return -1
}
@@ -982,20 +982,20 @@ proc remote_load { dest prog args } {
} else {
set dprog $prog
}
- set status [remote_exec host "[target_info objcopy]" "-O srec $dprog ${dprog}.sum"]
+ set status [remote_exec host "[target_info objcopy]" "-O srec $dprog $dprog.sum"]
if {[isremote host]} {
- remote_file upload ${dprog}.sum ${prog}.sum
+ remote_file upload $dprog.sum $prog.sum
}
if { [lindex $status 0] == 0 } {
set sumout [remote_exec build $sum_program $prog.sum]
set sum [lindex $sumout 1]
regsub "\[\r\n \t\]+$" $sum "" sum
} else {
- set sumout [remote_exec build $sum_program ${prog}]
+ set sumout [remote_exec build $sum_program $prog]
set sum [lindex $sumout 1]
regsub "\[\r\n \t\]+$" $sum "" sum
}
- remote_file build delete ${prog}.sum
+ remote_file build delete $prog.sum
}
if {[file exists $cache]} {
set same 0
@@ -1288,7 +1288,7 @@ proc remote_expect { board timeout args } {
append res "$x "
set next [expr {$i + 1}]
set y [lrange $args $next $next]
- append res "${y} "
+ append res "$y "
set got_re 1
incr i
continue
diff --git a/lib/rsh.exp b/lib/rsh.exp
index 7cd9064..315eec0 100644
--- a/lib/rsh.exp
+++ b/lib/rsh.exp
@@ -44,9 +44,9 @@ proc rsh_open { hostname } {
if {[board_info $hostname exists name]} {
set hostname [board_info $hostname name]
}
- set hostname [lindex [split [board_info ${hostname} netport] ":"] 0]
- if {[board_info ${hostname} exists shell_prompt]} {
- set shell_prompt [board_info ${hostname} shell_prompt]
+ set hostname [lindex [split [board_info $hostname netport] ":"] 0]
+ if {[board_info $hostname exists shell_prompt]} {
+ set shell_prompt [board_info $hostname shell_prompt]
} else {
set shell_prompt ".*> "
}
diff --git a/lib/target.exp b/lib/target.exp
index b818d92..d550a07 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -94,8 +94,8 @@ proc push_config { type name } {
proc pop_config { type } {
global target_info
- if {[info exists target_info(${type},name)]} {
- unset target_info(${type},name)
+ if {[info exists target_info($type,name)]} {
+ unset target_info($type,name)
}
}
@@ -527,7 +527,7 @@ proc default_target_compile {source destfile type options} {
if {[isnative]} {
# This is a lose.
catch "glob -nocomplain $tool_root_dir/libstdc++/libstdc++.so* $tool_root_dir/libstdc++/libstdc++.sl" tmp
- if { ${tmp} ne "" } {
+ if { $tmp ne "" } {
if {[regexp ".*solaris2.*" $target_triplet]} {
# Solaris 2
append add_flags " -R$tool_root_dir/libstdc++"
@@ -676,13 +676,13 @@ proc default_target_compile {source destfile type options} {
if { [lindex $status 0] != 0 && $comp_output eq "" } {
set comp_output "exit status is [lindex $status 0]"
}
- return ${comp_output}
+ return $comp_output
}
proc reboot_target { } {
set result [remote_reboot target]
puts "REBOOT_TARGET: \"$result\""
- return ${result}
+ return $result
}
# Invoke this if you really want as to be called directly, rather than
@@ -729,7 +729,7 @@ proc default_target_assemble { source destfile flags } {
if { [lindex $status 1] ne "" } {
verbose "assembler output is:\n[lindex $status 1]" 2
}
- return ${comp_output}
+ return $comp_output
}
# Invoke this if you really want ld to be called directly, rather than
@@ -821,5 +821,5 @@ proc default_link { board objects destfile flags } {
if { [lindex $status 1] ne "" } {
verbose "linker output is:\n[lindex $status 1]" 2
}
- return ${comp_output}
+ return $comp_output
}
diff --git a/lib/tip.exp b/lib/tip.exp
index d3b6ecd..3563660 100644
--- a/lib/tip.exp
+++ b/lib/tip.exp
@@ -28,18 +28,18 @@ proc tip_open { hostname } {
set result -1
if {[board_info $hostname exists name]} {
- set hostname [board_info ${hostname} name]
+ set hostname [board_info $hostname name]
}
- set port [board_info ${hostname} tipname]
- if {[board_info ${hostname} exists shell_prompt]} {
- set shell_prompt [board_info ${hostname} shell_prompt]
+ set port [board_info $hostname tipname]
+ if {[board_info $hostname exists shell_prompt]} {
+ set shell_prompt [board_info $hostname shell_prompt]
} else {
# Pick something reasonably generic.
set shell_prompt ".*> "
}
- if {[board_info ${hostname} exists fileid]} {
- unset board_info(${hostname},fileid)
+ if {[board_info $hostname exists fileid]} {
+ unset board_info($hostname,fileid)
}
spawn tip -v $port
if { $spawn_id < 0 } {
diff --git a/lib/utils.exp b/lib/utils.exp
index 30cf0b0..57a6831 100644
--- a/lib/utils.exp
+++ b/lib/utils.exp
@@ -43,10 +43,10 @@ proc getdirs { args } {
} else {
set pattern "*"
}
- verbose "Looking in ${path} for directories that match \"${pattern}\"" 3
- catch "glob ${path}/${pattern}" tmp
- if { ${tmp} ne "" } {
- foreach i ${tmp} {
+ verbose "Looking in $path for directories that match \"${pattern}\"" 3
+ catch "glob $path/$pattern" tmp
+ if { $tmp ne "" } {
+ foreach i $tmp {
if {[file isdirectory $i]} {
switch -- "[file tail $i]" {
"testsuite" -
@@ -310,57 +310,57 @@ proc diff { file_1 file_2 } {
set eof -1
set differences 0
- if {[file exists ${file_1}]} {
- set file_a [open ${file_1} r]
+ if {[file exists $file_1]} {
+ set file_a [open $file_1 r]
fconfigure $file_a -encoding binary
} else {
- warning "${file_1} doesn't exist"
+ warning "$file_1 doesn't exist"
return 0
}
- if {[file exists ${file_2}]} {
- set file_b [open ${file_2} r]
+ if {[file exists $file_2]} {
+ set file_b [open $file_2 r]
fconfigure $file_b -encoding binary
} else {
- warning "${file_2} doesn't exist"
+ warning "$file_2 doesn't exist"
return 0
}
- verbose "# Diff'ing: ${file_1} ${file_2}" 1
+ verbose "# Diff'ing: $file_1 $file_2" 1
set list_a ""
- while { [gets ${file_a} line] != ${eof} } {
- if {[regexp "^#.*$" ${line}]} {
+ while { [gets $file_a line] != $eof } {
+ if {[regexp "^#.*$" $line]} {
continue
} else {
- lappend list_a ${line}
+ lappend list_a $line
}
}
- close ${file_a}
+ close $file_a
set list_b ""
- while { [gets ${file_b} line] != ${eof} } {
- if {[regexp "^#.*$" ${line}]} {
+ while { [gets $file_b line] != $eof } {
+ if {[regexp "^#.*$" $line]} {
continue
} else {
- lappend list_b ${line}
+ lappend list_b $line
}
}
- close ${file_b}
+ close $file_b
for { set i 0 } { $i < [llength $list_a] } { incr i } {
- set line_a [lindex ${list_a} ${i}]
- set line_b [lindex ${list_b} ${i}]
+ set line_a [lindex $list_a $i]
+ set line_b [lindex $list_b $i]
if {$line_a ne $line_b} {
- verbose -log "line #${i}" 2
- verbose -log "\< ${line_a}" 2
- verbose -log "\> ${line_b}" 2
+ verbose -log "line #$i" 2
+ verbose -log "\< $line_a" 2
+ verbose -log "\> $line_b" 2
set differences -1
}
}
- if { $differences == -1 || [llength ${list_a}] != [llength ${list_b}] } {
+ if { $differences == -1 || [llength $list_a] != [llength $list_b] } {
verbose "Files not the same" 2
set differences -1
} else {