summaryrefslogtreecommitdiff
path: root/sim/testsuite
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-08-31 01:14:27 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-08-31 01:14:27 +0000
commite833b7618213d242416d64171381f774f4353572 (patch)
treecc31f4b800ea8d4816388b9386b36b993c2f016d /sim/testsuite
parent8ced9d34ff56ac4435c9176617e738a9a715cbd5 (diff)
downloadgdb-e833b7618213d242416d64171381f774f4353572.tar.gz
import gdb-1999-08-30 snapshot
Diffstat (limited to 'sim/testsuite')
-rw-r--r--sim/testsuite/ChangeLog10
-rw-r--r--sim/testsuite/lib/sim-defs.exp34
2 files changed, 34 insertions, 10 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 6946ddf79d2..1d855f871f2 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+1999-08-30 Doug Evans <devans@casey.cygnus.com>
+
+ * sim/arm/thumb/allthumb.exp: New driver for thumb testcases.
+ * sim/arm/allinsn.exp: New driver for arm testcases.
+
+ * lib/sim-defs.exp (run_sim_test): Rename all_machs arg to
+ requested_machs, now is list of machs to run tests for.
+ Delete locals AS,ASFLAGS,LD,LDFLAGS. Use target_assemble
+ and target_link instead.
+
1999-07-16 Ben Elliston <bje@cygnus.com>
* sim/arm/misaligned1.ms: New test case.
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 16a742fb6da..3224528412c 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