[RFA:] Make "#output:" in sim run_sim_test tests concatenate

Andrew Cagney cagney@gnu.org
Wed Nov 10 14:23:00 GMT 2004


Hans-Peter Nilsson wrote:
> I use the following feature extensively in the testsuite.  It
> means I don't have to write:
> 
> # output: 1\n0\n80000000\n7fffffff\n2a\n1\nffff\n1f\n0\n
> 
> But can instead write the slightly more traceable and
> manageable:
> 
> # output: 1\n
> # output: 0\n
> # output: 80000000\n
> # output: 7fffffff\n
> # output: 2a\n
> # output: 1\n
> # output: ffff\n
> # output: 1f\n
> # output: 0\n
> 
> Ok to commit?
> 
> 2004-11-09  Hans-Peter Nilsson  <hp@axis.com>
> 
> 	* lib/sim-defs.exp (run_sim_test): Make multiple "output"
> 	specifications concatenate, not override.

Hmm, yes, make it useful!

ok,
Andrew

> Index: sim-defs.exp
> ===================================================================
> RCS file: /cvs/src/src/sim/testsuite/lib/sim-defs.exp,v
> retrieving revision 1.8
> diff -c -p -r1.8 sim-defs.exp
> *** sim-defs.exp	26 Oct 2004 08:07:59 -0000	1.8
> --- sim-defs.exp	9 Nov 2004 19:19:01 -0000
> *************** proc run_sim_test { name requested_machs
> *** 229,234 ****
> --- 229,238 ----
>   	    unresolved $subdir/$name
>   	    return
>   	}
> + 	# Multiple "output" specifications concatenate, they don't override.
> + 	if { $opt_name == "output" } {
> + 	    set opt_val "$opts(output)$opt_val"
> + 	}
>   	foreach m $opt_machs {
>   	    set opts($opt_name,$m) $opt_val
>   	}
> 
> brgds, H-P
> 



More information about the Gdb-patches mailing list