From: Dave Brolley Date: Wed, 1 Nov 2000 15:40:35 +0000 (+0000) Subject: 2000-11-01 Dave Brolley X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ab7df8a89f8e8e297d068d2dd97fd4cd245cc1a;p=binutils-gdb.git 2000-11-01 Dave Brolley * 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. --- diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index bdb90786d0c..b5a72d0e875 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2000-11-01 Dave Brolley + + * 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 * 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 3224528412c..e00b99c9c8b 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)]: # ld[(mach-list)]: # sim[(mach-list)]: -# 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