1 |
#!/bin/sh |
2 |
|
3 |
#Test suite Configuration parameters |
4 |
#These may be modified if needed to suite local requirements |
5 |
|
6 |
TESTOUTDIR=/tmp/fbintf-testsuite |
7 |
USERNAME=SYSDBA |
8 |
PASSWORD=masterkey |
9 |
EMPLOYEEDB=employee |
10 |
NEWDBNAME=$TESTOUTDIR/testsuite1.fdb |
11 |
NEWDBNAME2=$TESTOUTDIR/testsuite2.fdb |
12 |
BAKFILE=$TESTOUTDIR/testsuite.gbk |
13 |
|
14 |
cd `dirname $0` |
15 |
mkdir -p $TESTOUTDIR |
16 |
chmod 777 $TESTOUTDIR |
17 |
export FPCDIR=/usr/lib/fpc/`fpc -iV` |
18 |
fpcmake |
19 |
make clean |
20 |
make |
21 |
if [ -x testsuite ]; then |
22 |
echo "" |
23 |
echo "Starting Testsuite" |
24 |
echo "" |
25 |
./testsuite -u $USERNAME -p $PASSWORD -e $EMPLOYEEDB -n $NEWDBNAME -s $NEWDBNAME2 -b $BAKFILE -o testout.log $1 |
26 |
echo "Comparing results with reference log" |
27 |
echo "" |
28 |
if grep 'ODS Major Version = 11' testout.log >/dev/null; then |
29 |
diff FB2reference.log testout.log >diff.log |
30 |
elif grep 'ODS Major Version = 12' testout.log >/dev/null; then |
31 |
diff FB3reference.log testout.log >diff.log |
32 |
fi |
33 |
cat diff.log |
34 |
else |
35 |
echo "Unable to run test suite" |
36 |
fi |
37 |
rm -r testunits |
38 |
rm testsuite |
39 |
exit 0 |
40 |
|