Commit | Line | Data |
---|---|---|
b2e0bd63 | 1 | # Test gasp. |
06c31539 | 2 | |
b2e0bd63 | 3 | proc gasp_test { filename testname opt } { |
06c31539 SC |
4 | global GASP |
5 | global srcdir | |
d0af5484 | 6 | global host_triplet |
b2e0bd63 ILT |
7 | |
8 | send_log "$srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out\n" | |
9 | catch "exec $srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out" errs | |
10 | catch "exec diff gasp.out $filename.out" diffs | |
dfe63797 | 11 | set diffs [prune_warnings $diffs] |
06c31539 SC |
12 | if ![string match "" $diffs] { |
13 | send_log "$diffs\n" | |
14 | verbose $diffs | |
15 | fail $testname | |
06c31539 SC |
16 | return 0 |
17 | } else { | |
18 | pass $testname | |
19 | } | |
20 | ||
21 | } | |
22 | ||
06c31539 SC |
23 | foreach src [ lsort [ glob $srcdir/gasp/*.asm ] ] { |
24 | regsub -all ".asm" $src "" t | |
b2e0bd63 ILT |
25 | regsub "^.*/(\[^/\]*)$" $t "gasp \\1" testname |
26 | gasp_test $t $testname "" | |
06c31539 SC |
27 | } |
28 | ||
b2e0bd63 ILT |
29 | foreach src [ lsort [ glob $srcdir/gasp/mri/*.asm ] ] { |
30 | regsub -all ".asm" $src "" t | |
31 | regsub "^.*/(\[^/\]*)$" $t "gasp MRI \\1" testname | |
32 | gasp_test $t $testname "-M" | |
33 | } | |
06c31539 SC |
34 | |
35 | # FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer | |
36 | # in use, then this can be removed. | |
37 | if [info exists errorInfo] then { | |
38 | unset errorInfo | |
39 | } | |
40 |