1995-08-14 20:06:03 +00:00
|
|
|
# Test gasp.
|
1995-08-01 02:45:00 +00:00
|
|
|
|
1995-08-14 20:06:03 +00:00
|
|
|
proc gasp_test { filename testname opt } {
|
1995-08-01 02:45:00 +00:00
|
|
|
global GASP
|
|
|
|
global srcdir
|
1995-08-14 20:06:03 +00:00
|
|
|
|
|
|
|
send_log "$srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out\n"
|
|
|
|
catch "exec $srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out" errs
|
|
|
|
catch "exec diff gasp.out $filename.out" diffs
|
1995-08-01 02:45:00 +00:00
|
|
|
if ![string match "" $diffs] {
|
|
|
|
send_log "$diffs\n"
|
|
|
|
verbose $diffs
|
|
|
|
fail $testname
|
|
|
|
return 0
|
|
|
|
} else {
|
|
|
|
pass $testname
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach src [ lsort [ glob $srcdir/gasp/*.asm ] ] {
|
|
|
|
regsub -all ".asm" $src "" t
|
1995-08-14 20:06:03 +00:00
|
|
|
regsub "^.*/(\[^/\]*)$" $t "gasp \\1" testname
|
|
|
|
gasp_test $t $testname ""
|
1995-08-01 02:45:00 +00:00
|
|
|
}
|
|
|
|
|
1995-08-14 20:06:03 +00:00
|
|
|
foreach src [ lsort [ glob $srcdir/gasp/mri/*.asm ] ] {
|
|
|
|
regsub -all ".asm" $src "" t
|
|
|
|
regsub "^.*/(\[^/\]*)$" $t "gasp MRI \\1" testname
|
|
|
|
gasp_test $t $testname "-M"
|
|
|
|
}
|
1995-08-01 02:45:00 +00:00
|
|
|
|
|
|
|
# FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer
|
|
|
|
# in use, then this can be removed.
|
|
|
|
if [info exists errorInfo] then {
|
|
|
|
unset errorInfo
|
|
|
|
}
|
|
|
|
|