author | Mario de Sousa <msousa@fe.up.pt> |
Fri, 19 Aug 2011 20:57:49 +0100 | |
changeset 356 | 9b23cdca0bae |
parent 258 | d7d92b2f87e9 |
permissions | -rwxr-xr-x |
108 | 1 |
#!/bin/bash |
2 |
||
3 |
# assume no error to start with... |
|
4 |
error=0 |
|
5 |
||
6 |
for ff in `ls *.test` |
|
7 |
do |
|
8 |
for id in `cat $ff | grep "^#" | sed "s/#[^ ]*//g"` |
|
9 |
do |
|
10 |
sed s/XXXX/$id/g $ff > $ff"_"$id.iec |
|
11 |
if `../../../iec2iec $ff"_"$id.iec -I ../../../lib > $ff"_"$id.out 2>$ff"_"$id.err` |
|
258
d7d92b2f87e9
Merging my Huge change with Edouards/Laurents version
Mario de Sousa <msousa@fe.up.pt>
parents:
108
diff
changeset
|
12 |
#if `../../../iec2c $ff"_"$id.iec -I ../../../lib > $ff"_"$id.out 2>$ff"_"$id.err` |
108 | 13 |
# TODO before deciding test is success [OK] |
14 |
# - test whether xxx.out has size <> 0 |
|
15 |
# - test whether xxx.err has size == 0 |
|
16 |
# - (?) test whether xxx.out2 is identical to xxx.out |
|
17 |
# - (?) test whether xxx.err2 has size == 0 |
|
18 |
# - perhaps produce a [WARN] instead of [ERROR] in cases of (?) |
|
19 |
then echo "[ O K ] " $ff "->" $id |
|
20 |
else echo "[ERROR] " $ff "->" $id; error=1 |
|
21 |
fi |
|
22 |
# ../../../iec2iec $ff"_"$id.out -I ../../../lib > $ff"_"$id.out2 2>$ff"_"$id.err2 |
|
23 |
done |
|
24 |
done |
|
25 |
||
26 |
echo |
|
27 |
if `test $error = 1` |
|
28 |
then echo "FAILURE -> At least one of the tests failed!" |
|
29 |
else echo "SUCCESS -> All tests passed!" |
|
30 |
fi |