ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/testsuite/runtest.sh
Revision: 315
Committed: Thu Feb 25 11:56:36 2021 UTC (3 years, 9 months ago) by tony
Content type: text/x-sh
File size: 1677 byte(s)
Log Message:
Updated for IBX 4 release

File Contents

# User Rev Content
1 tony 315 #!/bin/sh
2    
3     #Test suite Configuration parameters
4     #These may be modified if needed to suite local requirements
5    
6     TESTOUTDIR=/tmp/ibx-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     LOGFILE=testout.`date +%N`.log
14    
15     if [ -d "../fbintf" ]; then
16     export FBINTF="../fbintf"
17     elif [ -d "../../fbintf" ]; then
18     export FBINTF="../../fbintf"
19     else
20     echo "Error: unable to locate Pascal Firebird Interface API"
21     exit 2
22     fi
23    
24     LAZARUS=$HOME/lazarus
25     INCDIR="$FBINTF/client/3.0/firebird $FBINTF/client/include"
26     UNITDIR="$FBINTF $FBINTF/client $FBINTF/client/3.0/firebird $FBINTF/client/2.5 $FBINTF/client/3.0 $LAZARUS/components/lazutils"
27    
28     cd `dirname $0`
29     mkdir -p $TESTOUTDIR
30     chmod 777 $TESTOUTDIR
31     export FPCDIR=/usr/lib/fpc/`fpc -iV`
32     fpcmake
33     make clean
34     make INCDIR="$INCDIR" UNITDIR="$UNITDIR"
35     if [ -x testsuite ]; then
36     if [ -n "$FIREBIRD" ]; then
37     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FIREBIRD/lib
38     fi
39     echo ""
40     echo "Starting Testsuite"
41     echo ""
42     ./testsuite -u $USERNAME -p $PASSWORD -e $EMPLOYEEDB -n $NEWDBNAME -s $NEWDBNAME2 -b $BAKFILE -o $LOGFILE $@
43     echo "Comparing results with reference log"
44     echo ""
45     if grep 'ODS Major Version = 11' $LOGFILE >/dev/null; then
46     diff FB2reference.log $LOGFILE >diff.log
47     elif grep 'ODS Major Version = 12' $LOGFILE >/dev/null; then
48     diff FB3reference.log $LOGFILE >diff.log
49     else
50     diff FB4reference.log $LOGFILE >diff.log
51     fi
52     # cat diff.log
53     echo "`cat diff.log|wc -l` lines in diff"
54     else
55     echo "Unable to run test suite"
56     fi
57     echo "Log File is $LOGFILE"
58     rm -r testunits
59     rm testsuite
60     exit 0
61    

Properties

Name Value
svn:executable *