aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2006-06-08 23:58:17 +0000
committerBen Elliston <bje@gnu.org>2006-06-08 23:58:17 +0000
commit3f5ac97eaccc317adf5bbdbe34771261a01420f4 (patch)
tree7e5f55bf8d78fee03aabf9d2c52cb76c01b6bb53
parentb3ee71c2e357d7a0c4907aa8bb6d862d9dc0067a (diff)
downloaddejagnu-3f5ac97eaccc317adf5bbdbe34771261a01420f4.zip
dejagnu-3f5ac97eaccc317adf5bbdbe34771261a01420f4.tar.gz
dejagnu-3f5ac97eaccc317adf5bbdbe34771261a01420f4.tar.bz2
* baseboards/cris-sim.exp: Use Tcl fall-through syntax for
multiple cases, not a list (case uses lists, switch does not). Pass -glob to switch where applicable to emulate case behaviour. * baseboards/h8300.exp: Likewise. * lib/framework.exp (clone_output): Likewise. (clear_xfail): Likewise. (clear_kfail): Likewise. * lib/libgloss.exp (process_multilib_options): Likewise. * runtest.exp: Likewise.
-rw-r--r--ChangeLog12
-rw-r--r--baseboards/cris-sim.exp6
-rw-r--r--baseboards/h8300.exp11
-rw-r--r--lib/framework.exp13
-rw-r--r--lib/libgloss.exp30
-rwxr-xr-xruntest.exp3
6 files changed, 49 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index e0386c0..dfe1259 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-06-09 Ben Elliston <bje@gnu.org>
+
+ * baseboards/cris-sim.exp: Use Tcl fall-through syntax for
+ multiple cases, not a list (case uses lists, switch does not).
+ Pass -glob to switch where applicable to emulate case behaviour.
+ * baseboards/h8300.exp: Likewise.
+ * lib/framework.exp (clone_output): Likewise.
+ (clear_xfail): Likewise.
+ (clear_kfail): Likewise.
+ * lib/libgloss.exp (process_multilib_options): Likewise.
+ * runtest.exp: Likewise.
+
2006-06-06 Ben Elliston <bje@gnu.org>
* Makefile.am (CONTRIB): New.
diff --git a/baseboards/cris-sim.exp b/baseboards/cris-sim.exp
index 3ef4e5b..fd6400d 100644
--- a/baseboards/cris-sim.exp
+++ b/baseboards/cris-sim.exp
@@ -38,12 +38,14 @@ foreach x $board_variant_list {
# the "common" subset doesn't lose the compatibility.)
# Mnemonic: "a" is 10.
- { arch=common_v10_v32 -march=common_v10_v32 } {
+ "arch=common_v10_v32" -
+ "-march=common_v10_v32" {
set cris_simopt "--architecture cris"
}
# Mnemonic: "c" is... eh... comes after 10!
- { cpu=common_v10_v32 -mcpu=common_v10_v32 } {
+ "cpu=common_v10_v32" -
+ "-mcpu=common_v10_v32" {
set cris_simopt "--architecture crisv32"
}
}
diff --git a/baseboards/h8300.exp b/baseboards/h8300.exp
index bedb4f2..41260d2 100644
--- a/baseboards/h8300.exp
+++ b/baseboards/h8300.exp
@@ -68,12 +68,11 @@ foreach x $board_variant_list {
regsub -all "\[ \t\]*$" "$x" "" x
switch $x {
- { h -mh } {
- set linker_script "h8300h.ld"
- }
- { s -ms } {
- set linker_script "h8300s.ld"
- }
+ "h" -
+ "-mh" { set linker_script "h8300h.ld" }
+
+ "s" -
+ "-ms" { set linker_script "h8300s.ld" }
}
}
diff --git a/lib/framework.exp b/lib/framework.exp
index 92d409e..8693f1a 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -293,8 +293,13 @@ proc clone_output { message } {
}
regsub "^\[ \t\]*(\[^ \t\]+).*$" "$message" "\\1" firstword
- switch "$firstword" {
- {"PASS:" "XFAIL:" "KFAIL:" "UNRESOLVED:" "UNSUPPORTED:" "UNTESTED:"} {
+ switch -glob "$firstword" {
+ "PASS:" -
+ "XFAIL:" -
+ "KFAIL:" -
+ "UNRESOLVED:" -
+ "UNSUPPORTED:" -
+ "UNTESTED:" {
if {$all_flag} {
send_user "$message\n"
return "$message"
@@ -623,7 +628,7 @@ proc clear_xfail { args } {
set argc [ llength $args ]
for { set i 0 } { $i < $argc } { incr i } {
set sub_arg [ lindex $args $i ]
- switch $sub_arg {
+ switch -glob $sub_arg {
"*-*-*" { # is a configuration triplet
if {[istarget $sub_arg]} {
set xfail_flag 0
@@ -644,7 +649,7 @@ proc clear_kfail { args } {
set argc [ llength $args ]
for { set i 0 } { $i < $argc } { incr i } {
set sub_arg [ lindex $args $i ]
- switch $sub_arg {
+ switch -glob $sub_arg {
"*-*-*" { # is a configuration triplet
if {[istarget $sub_arg]} {
set kfail_flag 0
diff --git a/lib/libgloss.exp b/lib/libgloss.exp
index 8c2be25..5722636 100644
--- a/lib/libgloss.exp
+++ b/lib/libgloss.exp
@@ -759,43 +759,47 @@ proc process_multilib_options { args } {
if { $x == "" } {
continue
}
- switch $x {
- { aout } {
+ switch -glob $x {
+ "aout" {
set_board_info obj_format "a.out"
}
- { elf } {
+ "elf" {
set_board_info obj_format "elf"
}
- { pe } {
+ "pe" {
set_board_info obj_format "pe"
}
- { ecoff } {
+ "ecoff" {
set_board_info obj_format "ecoff"
}
- { stabs } {
+ "stabs" {
set_board_info debug_flags "-gstabs"
}
- { dwarf2 } {
+ "dwarf2" {
set_board_info debug_flags "-gdwarf2"
}
- { gdb:*=* } {
+ "gdb:*=*" {
regsub "^gdb:\[^=\]*=(.*)$" "$x" "\\1" value
regsub "^gdb:(\[^=\]*)=.*$" "$x" "\\1" variable
set_board_info $variable "$value"
}
- { gdb*remote } {
+ "gdb*remote" {
set is_gdb_remote 1
}
- { little*endian el EL } {
+ "little*endian" -
+ "el" -
+ "EL" {
append multilib_flags " -EL"
}
- { big*endian eb EB } {
+ "big*endian" -
+ "eb" -
+ "EB" {
append multilib_flags " -EB"
}
- { "soft*float" } {
+ "soft*float" {
append multilib_flags " -msoft-float"
}
- { "-*" } {
+ "-*" {
append multilib_flags " $x"
}
default {
diff --git a/runtest.exp b/runtest.exp
index 27a2269..f8e8dd6 100755
--- a/runtest.exp
+++ b/runtest.exp
@@ -700,7 +700,8 @@ if {[expr { $build_triplet == "" && $host_triplet == ""} ]} {
}
catch "exec $config_guess" build_triplet
switch $build_triplet {
- { "No uname command or uname output not recognized" "Unable to guess system type" } {
+ "No uname command or uname output not recognized" -
+ "Unable to guess system type" {
verbose "WARNING: Uname output not recognized"
set build_triplet unknown
}