-
-
Notifications
You must be signed in to change notification settings - Fork 360
/
runtests.sh
executable file
·50 lines (44 loc) · 1.1 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
#!/bin/bash
ret=0
tests=( misc gdal renderers wxs )
tests=( wxs )
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 gml and xml files, print a diff
if echo "$failedtest" | egrep -q "(xml|gml)$"; then
diff -u "../expected/$failedtest" "$failedtest"
fi
done
cd ../../..
done
exit $ret