6 |
|
TESTOUTDIR=/tmp/fbintf-testsuite |
7 |
|
USERNAME=SYSDBA |
8 |
|
PASSWORD=masterkey |
9 |
< |
EMPLOYEEDB=localhost:employee |
10 |
< |
NEWDBNAME=localhost:$TESTOUTDIR/testsuite1.fdb |
11 |
< |
NEWDBNAME2=localhost:$TESTOUTDIR/testsuite2.fdb |
9 |
> |
EMPLOYEEDB=employee |
10 |
> |
NEWDBNAME=$TESTOUTDIR/testsuite1.fdb |
11 |
> |
NEWDBNAME2=$TESTOUTDIR/testsuite2.fdb |
12 |
|
BAKFILE=$TESTOUTDIR/testsuite.gbk |
13 |
+ |
if [ -z "$FPC" ]; then |
14 |
+ |
export FPC=fpc |
15 |
+ |
fi |
16 |
|
|
17 |
|
cd `dirname $0` |
18 |
|
mkdir -p $TESTOUTDIR |
19 |
|
chmod 777 $TESTOUTDIR |
20 |
< |
export FPCDIR=/usr/lib/fpc/`fpc -iV` |
20 |
> |
export FPCDIR=/usr/lib/fpc/`$FPC -iV` |
21 |
|
fpcmake |
22 |
|
make clean |
23 |
|
make |
24 |
|
if [ -x testsuite ]; then |
25 |
+ |
if [ -n "$FIREBIRD" ]; then |
26 |
+ |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$FIREBIRD/lib" |
27 |
+ |
fi |
28 |
|
echo "" |
29 |
|
echo "Starting Testsuite" |
30 |
|
echo "" |
31 |
< |
./testsuite -u $USERNAME -p $PASSWORD -e $EMPLOYEEDB -n $NEWDBNAME -s $NEWDBNAME2 -b $BAKFILE -o testout.log $1 |
31 |
> |
./testsuite -u $USERNAME -p $PASSWORD -e $EMPLOYEEDB -n $NEWDBNAME -s $NEWDBNAME2 -b $BAKFILE -o testout.log $@ |
32 |
> |
#normalise data/time |
33 |
> |
sed -i 's|Timestamp = [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9]|Timestamp = yyyy/mm/dd hh:mm:ss.zzzz|' testout.log |
34 |
|
echo "Comparing results with reference log" |
35 |
|
echo "" |
36 |
< |
diff reference.log testout.log >diff.log |
36 |
> |
if grep 'ODS Major Version = 11' testout.log >/dev/null; then |
37 |
> |
diff FB2reference.log testout.log >diff.log |
38 |
> |
elif grep 'ODS Major Version = 12' testout.log >/dev/null; then |
39 |
> |
diff FB3reference.log testout.log >diff.log |
40 |
> |
else |
41 |
> |
diff FB4reference.log testout.log >diff.log |
42 |
> |
fi |
43 |
|
cat diff.log |
44 |
|
else |
45 |
|
echo "Unable to run test suite" |