summaryrefslogtreecommitdiff
path: root/tests/runtests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.sh')
-rwxr-xr-xtests/runtests.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/runtests.sh b/tests/runtests.sh
new file mode 100755
index 00000000..aa67ccde
--- /dev/null
+++ b/tests/runtests.sh
@@ -0,0 +1,55 @@
+#! /bin/sh
+
+LOGFILE=runtests.log
+POTENTIAL_TESTS='testboundaries'
+
+for I in $POTENTIAL_TESTS
+do
+ GOOD=yes
+ test -f $I || {
+ echo "WARNING: test program $I not found, not running"
+ GOOD=no
+ }
+
+ if test x$GOOD = xyes; then
+ test -x $I || {
+ echo "WARNING: test program $I is not executable, not running"
+ GOOD=no
+ }
+ fi
+
+ if test x$GOOD = xyes; then
+ TESTS="$TESTS$I "
+ fi
+done
+
+echo "Logging to $LOGFILE"
+
+echo "Log file for Pango test programs." > $LOGFILE
+echo "" >> $LOGFILE
+echo "Tests are: "$TESTS >> $LOGFILE
+echo "" >> $LOGFILE
+
+for I in $TESTS
+do
+ echo -n "Running test program \"$I\", please wait:"
+ echo "" >> $LOGFILE
+ echo "Output of $I:" >> $LOGFILE
+ if ./$I >>$LOGFILE 2>&1; then
+ echo " passed"
+ else
+ echo
+ echo
+ echo '***'
+ echo " Test failed: $I"
+ echo " See $LOGFILE for errors"
+ echo
+ exit 1
+ fi
+done
+
+echo
+echo "All tests passed."
+
+
+