Clean up spec file for packaging
[profile/ivi/pango.git] / tests / runtests.sh.in
1 #! @SHELL@
2
3 LOGFILE=runtests.log
4 POTENTIAL_TESTS='testboundaries testcolor testboundaries_ucd'
5
6 ECHO_C='@ECHO_C@'
7 ECHO_N='@ECHO_N@'
8
9 for I in $POTENTIAL_TESTS
10 do
11     GOOD=yes
12     test -f $I || {
13         echo "WARNING: test program $I not found, not running"
14         GOOD=no
15     }
16
17     if test x$GOOD = xyes; then
18         test -x $I || {
19             echo "WARNING: test program $I is not executable, not running"
20             GOOD=no
21         }
22     fi
23     
24     if test x$GOOD = xyes; then
25         TESTS="$TESTS$I "
26     fi
27 done
28
29 echo "Logging to $LOGFILE"
30
31 echo "Log file for Pango test programs." > $LOGFILE
32 echo "" >> $LOGFILE
33 echo "Tests are: "$TESTS >> $LOGFILE
34 echo "" >> $LOGFILE
35
36 for I in $TESTS
37 do
38     echo $ECHO_N "Running test program \"$I\", please wait:$ECHO_C"
39     echo "" >> $LOGFILE
40     echo "Output of $I:" >> $LOGFILE
41     if ./$I >>$LOGFILE 2>&1; then
42         echo " passed"
43     else
44         echo
45         echo
46         echo '***'
47         echo " Test failed: $I"
48         echo " See $LOGFILE for errors"
49         echo 
50         exit 1
51     fi
52 done
53
54 echo 
55 echo "All tests passed."