-
Notifications
You must be signed in to change notification settings - Fork 1
/
actualtest.sh
executable file
·72 lines (66 loc) · 1.82 KB
/
actualtest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
$TESTEXEC > test.out 2>&1
if test $TYPE != dom; then
fail=no
if test $POSITIVE = yes; then
if grep "Fatal error" test.out > /dev/null; then
fail=yes
fi
else
if ! grep "Fatal error" test.out > /dev/null; then
fail=yes
fi
fi
fi
if ! grep Finished test.out > /dev/null; then
if test $TYPE != dom || ! grep "$BASE$URI" $XFAIL > /dev/null; then
echo $BASE $URI $TYPE >> $CRASHED
fi
exit 0
else
grep -v "$BASE $URI" $CRASHED > $TMPFILE; mv $TMPFILE $CRASHED
fi
if grep Remaining test.out > /dev/null; then
echo $BASE$URI $TYPE >> $LEAKED
fi
rm -f test.out
if test x$OUTPUT != x && test $TYPE = dom; then
if ! grep "$BASE$URI" $XFAIL > /dev/null && ! grep "$BASE$URI" $NONASCII > /dev/null; then
cat $OUTPUT > out.xml.orig
echo >> out.xml.orig
echo diff
if diff out.xml.orig out.xml > test.out; then
echo $BASE $URI diff >> $PASSED
else
echo $BASE $URI diff >> $FAILED
echo $BASE $URI diff >> $DIFF
cat test.out >> $DIFF
echo >> $DIFF
echo diffdone >> $DIFF
fi
rm -f out.xml out.xml.orig test.out
fi
fi
if test $TYPE = dom; then
echo $BASE $URI $TYPE >> $PASSED
else
if test $fail = yes; then
echo failed
if grep "$BASE$URI" $XFAIL > /dev/null || grep "$BASE$URI" $NONASCII > /dev/null; then
grep -v "$BASE $URI" $FAILED > $TMPFILE; mv $TMPFILE $FAILED
echo $BASE$URI $TYPE >> $XFAIL.out
else
echo $BASE $URI $TYPE >> $FAILED
fi
grep -v "$BASE $URI $TYPE" $PASSED > $TMPFILE; mv $TMPFILE $PASSED
else
echo passed
if grep "$BASE$URI" $XFAIL > /dev/null || grep "$BASE$URI" $NONASCII; then
echo XPASS
echo $BASE $URI $TYPE >> $XPASS
else
grep -v "$BASE $URI $TYPE" $FAILED > $TMPFILE; mv $TMPFILE $FAILED
echo $BASE $URI $TYPE >> $PASSED
fi
fi
fi