-
-
Notifications
You must be signed in to change notification settings - Fork 359
/
runtests.sh
executable file
·62 lines (54 loc) · 1.25 KB
/
runtests.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
#!/bin/bash
ret=0
tests=( query )
for testcase in "${tests[@]}" ; do
cd msautotest/$testcase
./run_test.py
cd ../..
done
#tests failed, provide a summary
echo ""
echo " Test run summary "
echo "################################"
for testcase in "${tests[@]}"; do
cd msautotest/$testcase
echo ""
if [ ! -d result ]; then
#"result" directory does not exist, all tests passed
cd ../..
echo "$testcase: PASS"
continue
fi
cd result
#leftover .aux.xml files are valid for some gdal tests
failedtests=`find . ! -name '*.aux.xml' -type f -printf "%f\n" `
if [ -z "$failedtests" ]; then
cd ../../..
echo "$testcase: PASS"
continue
fi
#we have some failing tests
ret=1
echo "!!!!! $testcase: FAIL !!!!!"
echo "failing tests:"
for failedtest in $failedtests; do
echo $failedtest
#for txt, gml and xml files, print a diff
if echo "$failedtest" | egrep -q "(txt|xml|gml)$"; then
diff -u "../expected/$failedtest" "$failedtest"
fi
done
cd ../../..
done
# PHP tests
echo ""
echo " PHP Tests "
echo "#########################"
echo ""
cd msautotest/php
./run_test.py
if [ ! "$?" -eq 0 ]; then
ret=1
fi
cd ../..
exit $ret