aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/lib
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-08-31 01:14:27 +0000
committerJason Molenda <jmolenda@apple.com>1999-08-31 01:14:27 +0000
commit104c1213b4821a4b8664e66db4643a951b461576 (patch)
treed77adb32fcf044a485e1d4e0bb58e9da0ce39671 /sim/testsuite/lib
parentfd485a97b145f7b8abe7c5f5ec63edd8268a4182 (diff)
downloadgdb-104c1213b4821a4b8664e66db4643a951b461576.zip
gdb-104c1213b4821a4b8664e66db4643a951b461576.tar.gz
gdb-104c1213b4821a4b8664e66db4643a951b461576.tar.bz2
import gdb-1999-08-30 snapshot
Diffstat (limited to 'sim/testsuite/lib')
-rw-r--r--sim/testsuite/lib/sim-defs.exp34
1 files changed, 24 insertions, 10 deletions
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 16a742f..3224528 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -143,8 +143,12 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# Run testcase NAME.
# NAME is either a fully specified file name, or just the file name in which
# case $srcdir/$subdir will be prepended.
-# ALL_MACHS is a list of machs to use if "mach: all" is specified in the file.
-# The file can contain options in the form "# option(mach list): value"
+# REQUESTED_MACHS is a list of machines to run the testcase on. If NAME isn't
+# for the specified machine(s), it is ignored.
+# Typically REQUESTED_MACHS contains just one element, it is up to the caller
+# to iterate over the desired machine variants.
+#
+# The file can contain options in the form "# option(mach list): value".
# Possibilities:
# mach: [all | machine names]
# as[(mach-list)]: <assembler options>
@@ -156,9 +160,9 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# "fail" if xerror.
# The parens in "optname()" are optional if the specification is for all machs.
-proc run_sim_test { name all_machs } {
+proc run_sim_test { name requested_machs } {
global subdir srcdir
- global AS ASFLAGS LD LDFLAGS SIMFLAGS
+ global SIMFLAGS
global opts
if [string match "*/*" $name] {
@@ -210,14 +214,24 @@ proc run_sim_test { name all_machs } {
# Change \n sequences to newline chars.
regsub -all "\\\\n" $opts(output) "\n" opts(output)
- foreach mach $opts(mach) {
- verbose "Testing $name on $mach."
+ set testcase_machs $opts(mach)
+ if { "$testcase_machs" == "all" } {
+ set testcase_machs $requested_machs
+ }
+
+ foreach mach $testcase_machs {
+ if { [lsearch $requested_machs $mach] < 0 } {
+ verbose -log "Skipping $mach version of $name, not requested."
+ continue
+ }
+
+ verbose -log "Testing $name on machine $mach."
if ![info exists opts(as,$mach)] {
set opts(as,$mach) $opts(as)
}
- send_log "$AS $ASFLAGS $opts(as,$mach) -I$srcdir/$subdir -o ${name}.o $sourcefile\n"
- catch "exec $AS $ASFLAGS $opts(as,$mach) -I$srcdir/$subdir -o ${name}.o $sourcefile" comp_output
+
+ set comp_output [target_assemble $sourcefile ${name}.o "$opts(as,$mach) -I$srcdir/$subdir"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
@@ -228,8 +242,8 @@ proc run_sim_test { name all_machs } {
if ![info exists opts(ld,$mach)] {
set opts(ld,$mach) $opts(ld)
}
- send_log "$LD $LDFLAGS $opts(ld,$mach) -o ${name}.x ${name}.o\n"
- catch "exec $LD $LDFLAGS $opts(ld,$mach) -o ${name}.x ${name}.o" comp_output
+
+ set comp_output [target_link ${name}.o ${name}.x "$opts(ld,$mach)"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3