aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2000-11-01 15:40:35 +0000
committerDave Brolley <brolley@redhat.com>2000-11-01 15:40:35 +0000
commit0ab7df8a89f8e8e297d068d2dd97fd4cd245cc1a (patch)
tree113b952fc867d6e4010dda0642a6579c9068e630
parentee43f35ef7063359a8f0cdb4b793b8a3b9862230 (diff)
downloadgdb-0ab7df8a89f8e8e297d068d2dd97fd4cd245cc1a.zip
gdb-0ab7df8a89f8e8e297d068d2dd97fd4cd245cc1a.tar.gz
gdb-0ab7df8a89f8e8e297d068d2dd97fd4cd245cc1a.tar.bz2
2000-11-01 Dave Brolley <brolley@cygnus.com>
* lib/sim-defs.exp (run_sm_test): Correct comment. "output" and "xerror" options do not use a list of machines. Clear options from previous test case. Use "$cpu_option" to identify the machine to the assembler, if specified.
-rw-r--r--sim/testsuite/ChangeLog7
-rw-r--r--sim/testsuite/lib/sim-defs.exp37
2 files changed, 35 insertions, 9 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index bdb9078..b5a72d0 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-01 Dave Brolley <brolley@cygnus.com>
+
+ * lib/sim-defs.exp (run_sm_test): Correct comment. "output" and
+ "xerror" options do not use a list of machines. Clear options from
+ previous test case. Use "$cpu_option" to identify the machine to the
+ assembler, if specified.
+
Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 3224528..e00b99c9 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -154,8 +154,8 @@ proc sim_run { prog sim_opts prog_opts redir options } {
# as[(mach-list)]: <assembler options>
# ld[(mach-list)]: <linker options>
# sim[(mach-list)]: <simulator options>
-# output[(mach-list)]: program output pattern to match with string-match
-# xerror[(mach-list)]: program is expected to return with a "failure" exit code
+# output: program output pattern to match with string-match
+# xerror: program is expected to return with a "failure" exit code
# If `output' is not specified, the program must output "pass" if !xerror or
# "fail" if xerror.
# The parens in "optname()" are optional if the specification is for all machs.
@@ -164,6 +164,7 @@ proc run_sim_test { name requested_machs } {
global subdir srcdir
global SIMFLAGS
global opts
+ global cpu_option
if [string match "*/*" $name] {
set file $name
@@ -177,14 +178,28 @@ proc run_sim_test { name requested_machs } {
unresolved $subdir/$name
return
}
- set opts(as) {}
- set opts(ld) {}
- set opts(sim) {}
- set opts(output) {}
- set opts(mach) {}
- set opts(timeout) {}
+ # Clear default options
+ set opts(as) ""
+ set opts(ld) ""
+ set opts(sim) ""
+ set opts(output) ""
+ set opts(mach) ""
+ set opts(timeout) ""
set opts(xerror) "no"
+ # Clear any machine specific options specified in a previous test case
+ foreach m $requested_machs {
+ if [info exists opts(as,$m)] {
+ unset opts(as,$m)
+ }
+ if [info exists opts(ld,$m)] {
+ unset opts(ld,$m)
+ }
+ if [info exists opts(sim,$m)] {
+ unset opts(sim,$m)
+ }
+ }
+
foreach i $opt_array {
set opt_name [lindex $i 0]
set opt_machs [lindex $i 1]
@@ -231,7 +246,11 @@ proc run_sim_test { name requested_machs } {
set opts(as,$mach) $opts(as)
}
- set comp_output [target_assemble $sourcefile ${name}.o "$opts(as,$mach) -I$srcdir/$subdir"]
+ set as_options "$opts(as,$mach) -I$srcdir/$subdir"
+ if [info exists cpu_option] {
+ set as_options "$as_options $cpu_option=$mach"
+ }
+ set comp_output [target_assemble $sourcefile ${name}.o "$as_options"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3