Skip to content

Commit ca50f4a

Browse files
committed
added runtests.sh
1 parent 0816a4c commit ca50f4a

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

‎build/script/runtests.sh‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#! /bin/sh
2+
#
3+
# $Id$
4+
#
5+
# A script for running the POCO testsuites.
6+
#
7+
# usage: runtests
8+
#
9+
# If the environment variable EXCLUDE_TESTS is set, containing
10+
# a space-separated list of project names (as found in the
11+
# components file), these tests will be skipped.
12+
#
13+
14+
TESTRUNNER=./testrunner
15+
TESTRUNNERARGS=-all
16+
17+
components=`cat $POCO_BASE/components`
18+
19+
if [ "$OSNAME" = "" ] ; then
20+
OSNAME=`uname`
21+
fi
22+
if [ "$OSARCH" = "" ] ; then
23+
OSARCH=`uname -m | tr ' /' _-`
24+
fi
25+
BINDIR="bin/$OSNAME/$OSARCH/"
26+
27+
runs=0
28+
failures=0
29+
failedTests=""
30+
status=0
31+
32+
for comp in $components ;
33+
do
34+
excluded=0
35+
for excl in $EXCLUDE_TESTS ;
36+
do
37+
if [ "$excl" = "$comp" ] ; then
38+
excluded=1
39+
fi
40+
done
41+
if [ $excluded -eq 0 ] ; then
42+
if [ -d "$POCO_BASE/$comp/testsuite/$BINDIR" ] ; then
43+
if [ -x "$POCO_BASE/$comp/testsuite/$BINDIR/$TESTRUNNER" ] ; then
44+
echo ""
45+
echo ""
46+
echo "****************************************"
47+
echo "*** $comp"
48+
echo "****************************************"
49+
echo ""
50+
51+
runs=`expr $runs + 1`
52+
sh -c "cd $POCO_BASE/$comp/testsuite/$BINDIR && $TESTRUNNER $TESTRUNNERARGS"
53+
if [ $? -ne 0 ] ; then
54+
failues=`expr $failures + 1`
55+
failedTests="$failedTests $comp"
56+
status=1
57+
fi
58+
fi
59+
fi
60+
fi
61+
done
62+
63+
echo ""
64+
echo ""
65+
echo "$runs runs, $failures failed."
66+
echo ""
67+
for test in $failedTests ;
68+
do
69+
echo "Failed: $test"
70+
done
71+
echo ""
72+
73+
exit $status

0 commit comments

Comments
 (0)