From e833b7618213d242416d64171381f774f4353572 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 31 Aug 1999 01:14:27 +0000 Subject: import gdb-1999-08-30 snapshot --- sim/testsuite/ChangeLog | 10 ++++++++++ sim/testsuite/lib/sim-defs.exp | 34 ++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) (limited to 'sim/testsuite') 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 + + * 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 * 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)]: @@ -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 -- cgit v1.2.1