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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#!/bin/bash
if [ ! -z "$1" ]; then
PYTHON=$1
else
PYTHON=python
fi
if [ ! -z "$2" ]; then
TESTDIR="$2"
else
TESTDIR=`dirname $0`
fi
cd $TESTDIR
GOOD=1
echo "Testing CGN">&2
$PYTHON cgn.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing datatypes">&2
$PYTHON datatypes.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing evaluation">&2
$PYTHON evaluation.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing search">&2
$PYTHON search.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing textprocessors">&2
$PYTHON textprocessors.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing statistics">&2
$PYTHON statistics.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
echo "Testing formats">&2
$PYTHON formats.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
#echo "Testing folia">&2
#$PYTHON folia.py
#if [ $? -ne 0 ]; then
# echo "Test failed!!!" >&2
# GOOD=0
#fi
#echo "Testing FQL">&2
#$PYTHON fql.py
#if [ $? -ne 0 ]; then
# echo "Test failed!!!" >&2
# GOOD=0
#fi
echo "Testing CQL">&2
$PYTHON cql.py
if [ $? -ne 0 ]; then
echo "Test failed!!!" >&2
GOOD=0
fi
cd ..
if [ $GOOD -eq 1 ]; then
echo "Done, all tests passed!" >&2
exit 0
else
echo "TESTS FAILED!!!!" >&2
exit 1
fi
|