aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog13
-rw-r--r--baseboards/basic-sid.exp12
-rw-r--r--baseboards/basic-sim.exp8
-rw-r--r--baseboards/i386-sid.exp2
-rw-r--r--baseboards/mt-sid.exp2
-rw-r--r--baseboards/sh-sid.exp2
-rw-r--r--config/adb.exp4
-rw-r--r--config/gdb-comm.exp2
-rw-r--r--config/gdb_stub.exp4
-rw-r--r--config/sim.exp2
-rw-r--r--config/unix.exp2
-rw-r--r--config/vxworks.exp10
-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
-rw-r--r--testsuite/lib/libsup.exp68
-rw-r--r--testsuite/runtest.all/options.exp18
24 files changed, 238 insertions, 225 deletions
diff --git a/ChangeLog b/ChangeLog
index 9dbc152..538c2fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2018-12-09 Ben Elliston <bje@gnu.org>
+ * 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.
+
+2018-12-09 Ben Elliston <bje@gnu.org>
+
* lib/debugger.exp, lib/dg.exp, lib/framework.exp, lib/ftp.exp,
lib/kermit.exp, lib/libgloss.exp, lib/remote.exp, lib/rlogin.exp,
lib/target.exp, lib/tip.exp, lib/utils.exp, runtest.exp: Remove
diff --git a/baseboards/basic-sid.exp b/baseboards/basic-sid.exp
index 31e4d82..a09af6d 100644
--- a/baseboards/basic-sid.exp
+++ b/baseboards/basic-sid.exp
@@ -26,16 +26,16 @@ proc find_sid { target_alias } {
global env
global tool_root_dir
- set try [lookfor_file ${tool_root_dir} sid/bsp/${target_alias}-sid]
+ set try [lookfor_file $tool_root_dir sid/bsp/$target_alias-sid]
if { $try ne "" } {
- set sid_build [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
+ set sid_build [lookfor_file $tool_root_dir sid/main/dynamic/sid]
if { $sid_build ne "" } { set env(SID) $sid_build }
return $try
}
# In this case, the bsp script must be available on the PATH.
# Just hope for the best!
- return ${target_alias}-sid
+ return $target_alias-sid
}
# find_sid_conf -- find a usable pre-generated SID config file.
@@ -44,8 +44,8 @@ proc find_sid_conf { config } {
global env
global srcdir
- set try [lookfor_file ${srcdir} sid/bsp/pregen/${config}.conf]
- if { $try eq "" } then { return ${config}.conf } else { return $try }
+ set try [lookfor_file $srcdir sid/bsp/pregen/$config.conf]
+ if { $try eq "" } then { return $config.conf } else { return $try }
}
# find_rawsid -- find a usable SID simulator.
@@ -57,7 +57,7 @@ proc find_rawsid { } {
global tool_root_dir
global srcdir
- set try [lookfor_file ${tool_root_dir} sid/main/dynamic/sid]
+ set try [lookfor_file $tool_root_dir sid/main/dynamic/sid]
if { $try eq "" } {
set try "sid"
} else {
diff --git a/baseboards/basic-sim.exp b/baseboards/basic-sim.exp
index 96d5164..504c954 100644
--- a/baseboards/basic-sim.exp
+++ b/baseboards/basic-sim.exp
@@ -31,19 +31,19 @@ proc find_sim { target_alias sim_dir sim_name } {
if {[isremote host]} {
if {![board_info host exists no_transform_name]} {
- return ${target_alias}-${sim_name}
+ return $target_alias-$sim_name
} else {
- return ${sim_name}
+ return $sim_name
}
}
# We have to search because tool_root_dir may actually point to that blasted
# "target" subdirectory.
- set try [lookfor_file ${tool_root_dir} sim/${sim_dir}/${sim_name}]
+ set try [lookfor_file $tool_root_dir sim/$sim_dir/$sim_name]
if { $try ne "" } {
return $try
}
- return ${target_alias}-${sim_name}
+ return $target_alias-$sim_name
}
proc setup_sim { subdir_name } {
diff --git a/baseboards/i386-sid.exp b/baseboards/i386-sid.exp
index 3e5abb7..d1e8a2c 100644
--- a/baseboards/i386-sid.exp
+++ b/baseboards/i386-sid.exp
@@ -28,7 +28,7 @@ set_board_info ldflags "-nostdlib [libgloss_link_flags] [newlib_link_flags]"
set_board_info ldscript "-Tcygmon.ld"
set_board_info gdb,start_symbol "__start"
-if { ${tool} eq "gdb" } {
+if { $tool eq "gdb" } {
set_board_info sim,options "-f [find_sid_conf i386-gdb]"
} else {
set_board_info sim,options "-f [find_sid_conf i386-gloss]"
diff --git a/baseboards/mt-sid.exp b/baseboards/mt-sid.exp
index 52700a3..d781676 100644
--- a/baseboards/mt-sid.exp
+++ b/baseboards/mt-sid.exp
@@ -26,7 +26,7 @@ set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
verbose "Using simulator [board_info $board sim]\n"
set_board_info sim [find_rawsid]
-if { ${tool} eq "gdb" } {
+if { $tool eq "gdb" } {
set_board_info sim,options "-f [find_sid_conf mt-gdb]"
} else {
set_board_info sim,options "-f [find_sid_conf mt-gloss]"
diff --git a/baseboards/sh-sid.exp b/baseboards/sh-sid.exp
index 537ec76..a50a8b5 100644
--- a/baseboards/sh-sid.exp
+++ b/baseboards/sh-sid.exp
@@ -26,7 +26,7 @@ process_multilib_options ""
verbose "Using simulator [board_info $board sim]\n"
set_board_info sim [find_rawsid]
-if { ${tool} eq "gdb" } {
+if { $tool eq "gdb" } {
set_board_info sim,options "-f [find_sid_conf sh-gdb]"
} else {
set_board_info sim,options "-f [find_sid_conf sh-gloss]"
diff --git a/config/adb.exp b/config/adb.exp
index 87d3d1a..fb6b3d7 100644
--- a/config/adb.exp
+++ b/config/adb.exp
@@ -43,8 +43,8 @@ proc adb_open { hostname } {
set tries 0
set result -1
- if {[board_info ${hostname} exists shell_prompt]} {
- set shell_prompt [board_info ${hostname} shell_prompt]
+ if {[board_info $hostname exists shell_prompt]} {
+ set shell_prompt [board_info $hostname shell_prompt]
} else {
set shell_prompt "root@android:/ # "
}
diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp
index 776e012..c9ef574 100644
--- a/config/gdb-comm.exp
+++ b/config/gdb-comm.exp
@@ -164,7 +164,7 @@ proc gdb_comm_start { dest } {
# Similarly for GDB. Look in the object directory for gdb if we aren't
# provided with one.
if {![info exists GDB]} then {
- set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]"
+ set GDB "[lookfor_file $tool_root_dir gdb/gdb]"
if { $GDB eq "" } {
set GDB [transform gdb]
}
diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp
index 75ee8ee..b0bf61c 100644
--- a/config/gdb_stub.exp
+++ b/config/gdb_stub.exp
@@ -28,7 +28,7 @@ proc gdb_stub_init { dest args } {
global tool_root_dir
if {![info exists GDB]} then {
- set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]"
+ set GDB "[lookfor_file $tool_root_dir gdb/gdb]"
if { $GDB eq "" } {
set GDB [transform gdb]
}
@@ -82,7 +82,7 @@ proc gdb_stub_restart { dest } {
}
remote_reboot $dest
}
- if { ${x} < 4 } {
+ if { $x < 4 } {
global board_info
set name [board_info $dest name]
diff --git a/config/sim.exp b/config/sim.exp
index f6c5852..520a2c0 100644
--- a/config/sim.exp
+++ b/config/sim.exp
@@ -93,7 +93,7 @@ proc sim_load { dest prog args } {
# this isn't as nice as limiting the amount of CPU time, it
# will have to do.
if { $inpfile ne "" } {
- set res [remote_spawn target "${cmd} < $inpfile" "readonly"]
+ set res [remote_spawn target "$cmd < $inpfile" "readonly"]
} else {
set res [remote_spawn target $cmd]
}
diff --git a/config/unix.exp b/config/unix.exp
index 30e5d87..2e38454 100644
--- a/config/unix.exp
+++ b/config/unix.exp
@@ -114,7 +114,7 @@ proc unix_load { dest prog args } {
# rcp's to lynx seem not to get marked executable
set status [remote_exec $dest "chmod +x $remotefile"]
if { [lindex $status 0] != 0 } {
- remote_file $dest delete ${remotefile}.o $remotefile
+ remote_file $dest delete $remotefile.o $remotefile
verbose -log "chmod +x of $prog on $dest failed." 3
return [list "unresolved" ""]
}
diff --git a/config/vxworks.exp b/config/vxworks.exp
index e6ce9df..abf999d 100644
--- a/config/vxworks.exp
+++ b/config/vxworks.exp
@@ -138,7 +138,7 @@ proc vxworks_exec { dest program pargs inp outp } {
}
set shell_prompt [board_info $dest shell_prompt]
- remote_send $dest "${program} ${pargs}$suffix\n"
+ remote_send $dest "$program $pargs$suffix\n"
# FIXME: The value 300 below should probably be a parameter passed in.
remote_expect $dest 300 {
-re "\\\[VxWorks Boot\\\]:" {
@@ -180,12 +180,12 @@ proc vxworks_file { dest op args } {
set dir "[board_info $dest vxworks_homedir]"
switch -- $op {
exists {
- set file "${dir}/[file tail $file]"
+ set file "$dir/[file tail $file]"
return [file exists $file]
}
delete {
foreach x $args {
- set x "${dir}/[file tail $x]"
+ set x "$dir/[file tail $x]"
if { [file exists $x] && [file isfile $x] } {
file delete -force -- $x
}
@@ -324,7 +324,7 @@ proc vxworks_ld { dest prog } {
perror "Can't access $prog."
set result 1
}
- -re "value = (-*${decimal}) = ${hex}.*$shell_prompt $" {
+ -re "value = (-*$decimal) = $hex.*$shell_prompt $" {
verbose "Loaded $prog into vxworks."
set board_info([board_info $dest name],vx_module) $expect_out(1,string)
set result 0
@@ -377,7 +377,7 @@ proc vxworks_run { dest function pargs inp outp } {
set result 1
# FIXME: The value 300 below should be a parameter.
remote_expect $dest 300 {
- -re "task ${hex} - aborted.*$shell_prompt $" {
+ -re "task $hex - aborted.*$shell_prompt $" {
# FIXME: It's not clear we'll ever get here.
verbose "$function aborted"
set result 1
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 {
diff --git a/testsuite/lib/libsup.exp b/testsuite/lib/libsup.exp
index 88ecbcb..9512e5e 100644
--- a/testsuite/lib/libsup.exp
+++ b/testsuite/lib/libsup.exp
@@ -34,36 +34,36 @@ proc make_defaults_file { defs } {
# We need to setup default values and a few default procs so we
# can execute library code without DejaGnu
set fd [open $defs w]
- puts ${fd} "set tool foobar"
- puts ${fd} "set srcdir ${srcdir}"
- puts ${fd} "set objdir ${objdir}"
- puts ${fd} "set subdir ${subdir}"
- puts ${fd} "set build_triplet ${build_triplet}"
- puts ${fd} "set host_triplet ${host_triplet}"
- puts ${fd} "set target_triplet ${target_triplet}"
- puts ${fd} "set target_os ${target_os}"
- puts ${fd} "set target_cpu ${target_cpu}"
- puts ${fd} "set testcnt 0"
- puts ${fd} "set warncnt 0"
- puts ${fd} "set errcnt 0"
- puts ${fd} "set passcnt 0"
- puts ${fd} "set xpasscnt 0"
- puts ${fd} "set kpasscnt 0"
- puts ${fd} "set failcnt 0"
- puts ${fd} "set xfailcnt 0"
- puts ${fd} "set kfailcnt 0"
- puts ${fd} "set prms_id 0"
- puts ${fd} "set bug_id 0"
- puts ${fd} "set exit_status 0"
- puts ${fd} "set untestedcnt 0"
- puts ${fd} "set unresolvedcnt 0"
- puts ${fd} "set unsupportedcnt 0"
- puts ${fd} "set xfail_flag 0"
- puts ${fd} "set xfail_prms 0"
- puts ${fd} "set kfail_flag 0"
- puts ${fd} "set kfail_prms 0"
- puts ${fd} "set mail_logs 0"
- puts ${fd} "set multipass_name 0"
+ puts $fd "set tool foobar"
+ puts $fd "set srcdir $srcdir"
+ puts $fd "set objdir $objdir"
+ puts $fd "set subdir $subdir"
+ puts $fd "set build_triplet $build_triplet"
+ puts $fd "set host_triplet $host_triplet"
+ puts $fd "set target_triplet $target_triplet"
+ puts $fd "set target_os $target_os"
+ puts $fd "set target_cpu $target_cpu"
+ puts $fd "set testcnt 0"
+ puts $fd "set warncnt 0"
+ puts $fd "set errcnt 0"
+ puts $fd "set passcnt 0"
+ puts $fd "set xpasscnt 0"
+ puts $fd "set kpasscnt 0"
+ puts $fd "set failcnt 0"
+ puts $fd "set xfailcnt 0"
+ puts $fd "set kfailcnt 0"
+ puts $fd "set prms_id 0"
+ puts $fd "set bug_id 0"
+ puts $fd "set exit_status 0"
+ puts $fd "set untestedcnt 0"
+ puts $fd "set unresolvedcnt 0"
+ puts $fd "set unsupportedcnt 0"
+ puts $fd "set xfail_flag 0"
+ puts $fd "set xfail_prms 0"
+ puts $fd "set kfail_flag 0"
+ puts $fd "set kfail_prms 0"
+ puts $fd "set mail_logs 0"
+ puts $fd "set multipass_name 0"
catch "close $fd"
}
@@ -75,7 +75,7 @@ proc start_expect { } {
# can execute library code without DejaGnu
set defaults_file setval.tmp
make_defaults_file $defaults_file
- set fd [open ${defaults_file} w]
+ set fd [open $defaults_file w]
# look for expect
if {![info exists EXPECT]} {
@@ -99,7 +99,7 @@ proc start_expect { } {
}
# Load the defaults file
- exp_send "source ${defaults_file}\n"
+ exp_send "source $defaults_file\n"
expect {
"expect*> " {
verbose "Loaded testing defaults file." 2
@@ -129,10 +129,10 @@ proc stop_expect { } {
#
proc load_test_lib { lib } {
global spawn_id
- exp_send "source ${lib}\n"
+ exp_send "source $lib\n"
expect {
"expect*> " {
- verbose "Testing ${lib}" 2
+ verbose "Testing $lib" 2
}
timeout {
perror "Couldn't load the libraries to test"
diff --git a/testsuite/runtest.all/options.exp b/testsuite/runtest.all/options.exp
index da344a4..7bd3e54 100644
--- a/testsuite/runtest.all/options.exp
+++ b/testsuite/runtest.all/options.exp
@@ -25,10 +25,10 @@ load_lib util-defs.exp
# catch "exec mv -f $objdir/site.exp $objdir/site.ignore"
#}
set fd [open site.exp w]
-puts ${fd} "set host_triplet $host_triplet"
-puts ${fd} "set srcdir $srcdir/.."
-puts ${fd} "set objdir $objdir/.."
-puts ${fd} "set tmpdir $objdir/../tmpdir"
+puts $fd "set host_triplet $host_triplet"
+puts $fd "set srcdir $srcdir/.."
+puts $fd "set objdir $objdir/.."
+puts $fd "set tmpdir $objdir/../tmpdir"
close $fd
#
@@ -65,7 +65,7 @@ set tests {
}
foreach t $tests {
- if [util_test $RUNTEST "[lindex $t 0] -srcdir ${srcdir}/runtest.all" "" "[lindex $t 1]"] {
+ if [util_test $RUNTEST "[lindex $t 0] -srcdir $srcdir/runtest.all" "" "[lindex $t 1]"] {
fail "[lindex $t 2]"
} else {
pass "[lindex $t 2]"
@@ -74,10 +74,10 @@ foreach t $tests {
set fd [open site.exp w]
-puts ${fd} "set host_triplet $host_triplet"
-puts ${fd} "set srcdir $srcdir"
-puts ${fd} "set objdir $objdir"
-puts ${fd} "set tmpdir $objdir/tmpdir"
+puts $fd "set host_triplet $host_triplet"
+puts $fd "set srcdir $srcdir"
+puts $fd "set objdir $objdir"
+puts $fd "set tmpdir $objdir/tmpdir"
close $fd
# clean up log files left by the child runtest