1
[csql.git] / test / dbapi / Table / test003.ksh
blob0c318915761d856af8ca4e85f4dd5c0a1cc67f83
1 #!/bin/ksh
2 #Run this test only under csql/test or on this directory.
3 #Otherwise, it may fail
4 executable=${PWD}/dbapi/Table/insert
5 CSQL_CONF=${PWD}/dbapi/Table/csql.conf
6 REL_PATH=.
7 if [ -s "$executable" -a -s "$CSQL_CONF" ]
8 then
9 REL_PATH=${PWD}/dbapi/Table
12 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
14 $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
15 pid=$!
16 sleep 5
18 if [ $VALGRIND = "true" ]
19 then
20 valgrind --tool=memcheck --leak-check=full ${REL_PATH}/insert 2> $0.valgr
21 else
22 $REL_PATH/insert
23 if [ $? -ne 0 ]
24 then
25 exit 2;
29 kill -9 $pid
30 if [ $? -ne 0 ]
31 then
32 exit 3;
34 ipcrm -M 7117 -M 1771
36 exit 0;