*** empty log message ***
[csql.git] / test / tools / csqldump / test007.ksh
blobf0aaf130023f9f0130c9b80b57a1481112655b0f
1 #!/bin/ksh
3 #Run this test only under csql/test or on this directory.
4 #Otherwise, it may fail
5 CSQL_CONF=${PWD}/tools/csqldump/csql.conf
6 executable=${PWD}/tools/csqldump/insert
7 REL_PATH=.
8 if [ -s "$executable" -a -s "$CSQL_CONF" ]
9 then
10 REL_PATH=${PWD}/tools/csqldump
12 rm
13 export CSQL_CONFIG_FILE=$REL_PATH/csql.conf
14 $CSQL_INSTALL_ROOT/bin/csqlserver >/dev/null 2>&1 &
15 pid=$!
16 sleep 8
17 $REL_PATH/insert >/dev/null 2>&1
18 if [ $? -ne 0 ]
19 then
20 exit 1;
23 if [ "$VALGRIND" = "true" ]
24 then
25 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csqldump 2> $0.valgr
26 else
27 $CSQL_INSTALL_ROOT/bin/csqldump >tmp.out
28 if [ $? -ne 0 ]
29 then
30 exit 2;
34 head -n 13 tmp.out
35 tail tmp.out
36 rm -f tmp.out
38 if [ "$VALGRIND" = "true" ]
39 then
40 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s $REL_PATH/drop.sql 2>> $0.valgr
41 else
42 $CSQL_INSTALL_ROOT/bin/csql -u root -p manager -s $REL_PATH/drop.sql > /dev/null 2>&1
43 if [ $? -ne 0 ]
44 then
45 exit 3;
49 kill -9 $pid > /dev/null 2>&1
50 ipcrm -M 1234 -M 4321
52 exit 0;