mysql-test-run.sh 12.2 KB
Newer Older
bk@work.mysql.com's avatar
bk@work.mysql.com committed
1
#! /bin/sh
2 3
# mysql-test-run - originally written by Matt Wagner <matt@mysql.com>
# modified by Sasha Pachev <sasha@mysql.com>
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
4
# Sligtly updated by Monty
5
# Cleaned up again by Matt
bk@work.mysql.com's avatar
bk@work.mysql.com committed
6 7 8 9 10

#++
# Access Definitions
#--
DB=test
11 12
DBUSER=test
DBPASSWD=
13
VERBOSE=""
bk@work.mysql.com's avatar
bk@work.mysql.com committed
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28
# Are we on source or binary distribution?

if [ $0 = scripts/mysql-test-run ] ;
then
 BINARY_DIST=1
 cd mysql-test
else
 if [ -d mysql-test ] ; then
  cd mysql-test
 fi
  
 if [ -f ./mysql-test-run ] && [ -d ../sql ] ; then
 SOURCE_DIST=1
 else
29 30 31
  $ECHO "If you are using binary distribution, run from install root as"
  $ECHO "scripts/mysql-test-run. On source distribution run from source root"
  $ECHO "as mysql-test/mysql-test-run or from mysql-test as ./mysql-test-run"
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
32
  exit 1
33 34
 fi
fi
35

bk@work.mysql.com's avatar
bk@work.mysql.com committed
36 37 38
#++
# Misc. Definitions
#--
39 40

#BASEDIR is always one above mysql-test directory 
bk@work.mysql.com's avatar
bk@work.mysql.com committed
41 42 43 44
CWD=`pwd`
cd ..
BASEDIR=`pwd`
cd $CWD
45
MYSQL_TEST_DIR=$BASEDIR/mysql-test
46
STD_DATA=$MYSQL_TEST_DIR/std_data
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
47
SED=sed
48 49
  
TESTDIR="$MYSQL_TEST_DIR/t/"
50
TESTSUFFIX=test
bk@work.mysql.com's avatar
bk@work.mysql.com committed
51 52 53
TOT_PASS=0
TOT_FAIL=0
TOT_TEST=0
54 55 56
USERT=0
SYST=0
REALT=0
57 58
MY_TMP_DIR=$MYSQL_TEST_DIR/var/tmp
TIMEFILE="$MYSQL_TEST_DIR/var/tmp/mysqltest-time"
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
59
RES_SPACE="      "
60 61
MYSQLD_SRC_DIRS="strings mysys include extra regex isam merge myisam \
 myisammrg heap sql"
62
GCOV_MSG=/tmp/mysqld-gcov.out
63
GCOV_ERR=/tmp/mysqld-gcov.err  
64

sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
65 66 67
MASTER_RUNNING=0
SLAVE_RUNNING=0

68
[ -d $MY_TMP_DIR ]  || mkdir -p $MY_TMP_DIR
bk@work.mysql.com's avatar
bk@work.mysql.com committed
69 70 71 72

#++
# mysqld Environment Parameters
#--
73 74
MYRUN_DIR=var/run
MASTER_MYPORT=9306
75 76 77 78 79 80
MASTER_MYDDIR="$MYSQL_TEST_DIR/var/lib"
MASTER_MYSOCK="$MYSQL_TEST_DIR/var/tmp/mysql.sock"
MASTER_MYPID="$MYSQL_TEST_DIR/var/run/mysqld.pid"
MASTER_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld.log"
MASTER_MYERR="$MYSQL_TEST_DIR/var/log/mysqld.err"

81 82

SLAVE_MYPORT=9307
83 84 85 86 87 88 89 90 91 92 93
SLAVE_MYDDIR="$MYSQL_TEST_DIR/var/slave-data"
SLAVE_MYSOCK="$MYSQL_TEST_DIR/var/tmp/mysql-slave.sock"
SLAVE_MYPID="$MYSQL_TEST_DIR/var/run/mysqld-slave.pid"
SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log"
SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err"

if [ x$SOURCE_DIST = x1 ] ; then
 MY_BASEDIR=$MYSQL_TEST_DIR
else
 MY_BASEDIR=$BASEDIR
fi  
bk@work.mysql.com's avatar
bk@work.mysql.com committed
94 95 96 97

#++
# Program Definitions
#--
98
BASENAME=`which basename | head -1`
99 100
CAT=/bin/cat
CUT=/usr/bin/cut
101 102
ECHO=echo # use internal echo if possible
EXPR=expr # use internal if possible
103
FIND=/usr/bin/find
104
GCOV=`which gcov | head -1`
105
PRINTF=/usr/bin/printf
106
RM=/bin/rm
bk@work.mysql.com's avatar
bk@work.mysql.com committed
107
TIME=/usr/bin/time
108
TR=/usr/bin/tr
109
XARGS=`which xargs | head -1`
110

111 112
[ -z "$COLUMNS" ] && COLUMNS=80
E=`$EXPR $COLUMNS - 8`
113 114
#DASH72=`expr substr '------------------------------------------------------------------------' 1 $E`
DASH72=`$ECHO '------------------------------------------------------------------------'|$CUT -c 1-$E`
115

116 117 118 119 120 121 122 123 124 125 126 127 128 129
# on source dist, we pick up freshly build executables
# on binary, use what is installed
if [ x$SOURCE_DIST = x1 ] ; then
 MYSQLD="$BASEDIR/sql/mysqld"
 MYSQL_TEST="$BASEDIR/client/mysqltest"
 MYSQLADMIN="$BASEDIR/client/mysqladmin"
 INSTALL_DB="./install_test_db"
else
 MYSQLD="$BASEDIR/bin/mysqld"
 MYSQL_TEST="$BASEDIR/bin/mysqltest"
 MYSQLADMIN="$BASEDIR/bin/mysqladmin"
 INSTALL_DB="../scripts/install_test_db -bin"
fi

130

131
SLAVE_MYSQLD=$MYSQLD #this will be changed later if we are doing gcov
132

133
MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent -v"
134 135 136
GDB_MASTER_INIT=/tmp/gdbinit.master
GDB_SLAVE_INIT=/tmp/gdbinit.slave

137 138 139 140 141 142
while test $# -gt 0; do
  case "$1" in
    --force ) FORCE=1 ;;
    --record ) RECORD=1 ;;
    --gcov )
      if [ x$BINARY_DIST = x1 ] ; then
143
	$ECHO "Cannot do coverage test without the source - please use source dist"
144 145 146 147 148 149
	exit 1
      fi
      DO_GCOV=1
      ;;
    --gdb )
      if [ x$BINARY_DIST = x1 ] ; then
150
	$ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with -gdb option"
151 152 153 154
      fi
      DO_GDB=1
      ;;
    -- )  shift; break ;;
155
    --* ) $ECHO "Unrecognized option: $1"; exit 1 ;;
156 157 158 159
    * ) break ;;
  esac
  shift
done
bk@work.mysql.com's avatar
bk@work.mysql.com committed
160 161 162 163 164

#++
# Function Definitions
#--

165 166
prompt_user ()
{
167
 $ECHO $1
168
 read unused
169 170
}

bk@work.mysql.com's avatar
bk@work.mysql.com committed
171 172

error () {
173
    $ECHO  "Error:  $1"
bk@work.mysql.com's avatar
bk@work.mysql.com committed
174 175 176
    exit 1
}

177
error_is () {
178
    $ECHO `$CAT $TIMEFILE` | $SED -e 's/.* At line \(.*\)\: \(.*\)Command .*$/   \>\> Error at line \1: \2<\</'
179 180
}

monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
181
prefix_to_8() {
182
 $ECHO "        $1" | $SED -e 's:.*\(........\)$:\1:'
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
183 184
}

bk@work.mysql.com's avatar
bk@work.mysql.com committed
185
pass_inc () {
186
    TOT_PASS=`$EXPR $TOT_PASS + 1`
bk@work.mysql.com's avatar
bk@work.mysql.com committed
187 188 189
}

fail_inc () {
190
    TOT_FAIL=`$EXPR $TOT_FAIL + 1`
bk@work.mysql.com's avatar
bk@work.mysql.com committed
191 192
}

193 194 195 196
skip_inc () {
    TOT_SKIP=`$EXPR $TOT_SKIP + 1`
}

bk@work.mysql.com's avatar
bk@work.mysql.com committed
197
total_inc () {
198
    TOT_TEST=`$EXPR $TOT_TEST + 1`
bk@work.mysql.com's avatar
bk@work.mysql.com committed
199 200 201
}

report_stats () {
202
    if [ $TOT_FAIL = 0 ]; then
203
	$ECHO "All tests successful."
bk@work.mysql.com's avatar
bk@work.mysql.com committed
204
    else
205 206 207 208 209 210
	xten=`$EXPR $TOT_PASS \* 10000`   
	raw=`$EXPR $xten / $TOT_TEST`     
	raw=`$PRINTF %.4d $raw`           
	whole=`$PRINTF %.2s $raw`         
	xwhole=`$EXPR $whole \* 100`      
	deci=`$EXPR $raw - $xwhole`       
211
	$ECHO  "Failed ${TOT_FAIL}/${TOT_TEST} tests, ${whole}.${deci}% successful."
bk@work.mysql.com's avatar
bk@work.mysql.com committed
212 213
    fi
}
214

bk@work.mysql.com's avatar
bk@work.mysql.com committed
215
mysql_install_db () {
216
    $ECHO "Removing Stale Files"
217 218
    $RM -rf $MASTER_MYDDIR $SLAVE_MYDDIR $SLAVE_MYLOG $MASTER_MYLOG \
     $SLAVE_MYERR $MASTER_MYERR
219
    [ -d $MYRUN_DIR ] || mkdir -p $MYRUN_DIR
220
    $ECHO "Installing Master Databases"
221 222 223 224 225
    $INSTALL_DB
    if [ $? != 0 ]; then
	error "Could not install master test DBs"
	exit 1
    fi
226
    $ECHO "Installing Slave Databases"
227
    $INSTALL_DB -slave
228
    if [ $? != 0 ]; then
229
	error "Could not install slave test DBs"
230
	exit 1
bk@work.mysql.com's avatar
bk@work.mysql.com committed
231 232 233 234
    fi
    return 0
}

235
gcov_prepare () {
236 237
    $FIND $BASEDIR -name \*.gcov \
    -or -name \*.da | $XARGS $RM
238 239 240
}

gcov_collect () {
241
    $ECHO "Collecting source coverage info..."
242 243
    [ -f $GCOV_MSG ] && $RM $GCOV_MSG
    [ -f $GCOV_ERR ] && $RM $GCOV_ERR
244 245 246
    for d in $MYSQLD_SRC_DIRS; do
	cd $BASEDIR/$d
	for f in *.h *.cc *.c; do
247
	    $GCOV $f 2>>$GCOV_ERR  >>$GCOV_MSG
248
	done
249
	cd $MYSQL_TEST_DIR
250 251
    done

252
    $ECHO "gcov  info in $GCOV_MSG, errors in $GCOV_ERR"
253 254
}

255 256
start_master()
{
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
257
    [ x$MASTER_RUNNING = 1 ] && return
258
    cd $BASEDIR # for gcov
259
    #start master
260
    master_args="--no-defaults --log-bin=master-bin \
261
    	    --server-id=1 \
262
            --basedir=$MY_BASEDIR \
263
	    --port=$MASTER_MYPORT \
264
	    --exit-info=256 \
265 266 267 268
            --datadir=$MASTER_MYDDIR \
	    --pid-file=$MASTER_MYPID \
	    --socket=$MASTER_MYSOCK \
            --log=$MASTER_MYLOG \
269 270 271
	    --language=english $EXTRA_MASTER_OPT"
    if [ x$DO_GDB = x1 ]
    then
272
      $ECHO "set args $master_args" > $GDB_MASTER_INIT
273 274 275 276 277 278 279 280 281 282
      xterm -title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD &
      prompt_user "Hit enter to continue after you've started the master"
    else	    
      $MYSQLD $master_args  >> $MASTER_MYERR 2>&1 &
    fi  
  MASTER_RUNNING=1
}

start_slave()
{
283
    [ x$SKIP_SLAVE = x1 ] && return
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
284
    [ x$SLAVE_RUNNING = 1 ] && return
285
    if [ -z "$SLAVE_MASTER_INFO" ] ; then
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
286
      master_info="--master-user=root \
287
	    --master-connect-retry=1 \
288 289
	    --master-host=127.0.0.1 \
	    --master-port=$MASTER_MYPORT \
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
290 291 292 293 294 295 296
	    --server-id=2"
   else
     master_info=$SLAVE_MASTER_INFO
   fi	    
    
    slave_args="--no-defaults $master_info \
    	    --exit-info=256 \
297
	    --log-bin=slave-bin --log-slave-updates \
298
            --basedir=$MY_BASEDIR \
299 300 301 302 303
            --datadir=$SLAVE_MYDDIR \
	    --pid-file=$SLAVE_MYPID \
	    --port=$SLAVE_MYPORT \
	    --socket=$SLAVE_MYSOCK \
            --log=$SLAVE_MYLOG \
304 305 306
            --language=english $EXTRA_SLAVE_OPT"
    if [ x$DO_GDB = x1 ]
    then
307
      $ECHO "set args $slave_args" > $GDB_SLAVE_INIT
308
      xterm -title "Slave" -e gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD &
309
      prompt_user "Hit enter to continue after you've started the slave"
310 311
    else
      $SLAVE_MYSQLD $slave_args  >> $SLAVE_MYERR 2>&1 &
312 313 314 315 316
    fi
    SLAVE_RUNNING=1
}

mysql_start () {
317
    $ECHO "Starting MySQL daemon"
318 319
    start_master
    start_slave
320
    cd $MYSQL_TEST_DIR
bk@work.mysql.com's avatar
bk@work.mysql.com committed
321 322 323
    return 1
}

324 325 326 327
stop_slave ()
{
  if [ x$SLAVE_RUNNING = x1 ]
  then
328
    $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown
329
    if [ $? != 0 ] ; then # try harder!
330
     $ECHO "slave not cooperating with mysqladmin, will try manual kill"
331 332 333
     kill `cat $SLAVE_MYPID`
     sleep 2
     if [ -f $SLAVE_MYPID ] ; then
334
       $ECHO "slave refused to die, resorting to SIGKILL murder"
335
       kill -9 `cat $SLAVE_MYPID`
336
       $RM -f $SLAVE_MYPID
337
     else
338
      $ECHO "slave responded to SIGTERM " 
339 340
     fi
    fi
341 342 343
    SLAVE_RUNNING=0
  fi  
}
bk@work.mysql.com's avatar
bk@work.mysql.com committed
344

345 346 347 348
stop_master ()
{
  if [ x$MASTER_RUNNING = x1 ]
  then
349
    $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown
350
    if [ $? != 0 ] ; then # try harder!
351
     $ECHO "master not cooperating with mysqladmin, will try manual kill"
352 353 354
     kill `cat $MASTER_MYPID`
     sleep 2
     if [ -f $MASTER_MYPID ] ; then
355
       $ECHO "master refused to die, resorting to SIGKILL murder"
356
       kill -9 `cat $MASTER_MYPID`
357
       $RM -f $MASTER_MYPID
358
     else
359
      $ECHO "master responded to SIGTERM " 
360 361
     fi
    fi
362 363 364
    MASTER_RUNNING=0
  fi
}
bk@work.mysql.com's avatar
bk@work.mysql.com committed
365

366 367
mysql_stop ()
{
368 369 370
 $ECHO  "Ending Tests"
 $ECHO  "Shutting-down MySQL daemon"
 $ECHO
371 372 373
 stop_master
 stop_slave
 return 1
bk@work.mysql.com's avatar
bk@work.mysql.com committed
374 375 376 377 378 379 380 381 382 383 384
}

mysql_restart () {

    mysql_stop
    mysql_start

    return 1
}

mysql_loadstd () {
385 386
    
    cp $STD_DATA/*.frm $STD_DATA/*.MRG $MASTER_MYDDIR/test  
bk@work.mysql.com's avatar
bk@work.mysql.com committed
387 388 389
    return 1
}

390 391 392
run_testcase ()
{
 tf=$1
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
393
 tname=`$BASENAME $tf .test`
394 395
 master_opt_file=$TESTDIR/$tname-master.opt
 slave_opt_file=$TESTDIR/$tname-slave.opt
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
396
 slave_master_info_file=$TESTDIR/$tname-slave-master-info.opt
397
 SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0`
398 399 400 401 402 403
 if [ x$RECORD = x1 ]; then
  extra_flags="-r"
 else
  extra_flags=""
 fi
  
404 405 406 407 408 409
 if [ -f $master_opt_file ] ;
 then
  EXTRA_MASTER_OPT=`cat $master_opt_file`
  stop_master
  start_master
 else
410
  if [ ! -z "$EXTRA_MASTER_OPT" ] || [ x$MASTER_RUNNING != x1 ] ;
411 412 413 414 415 416
  then
    EXTRA_MASTER_OPT=""
    stop_master
    start_master
  fi  
 fi
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
417 418
 do_slave_restart=0
 
419 420 421
 if [ -f $slave_opt_file ] ;
 then
  EXTRA_SLAVE_OPT=`cat $slave_opt_file`
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
422
  do_slave_restart=1
423
 else
424
  if [ ! -z "$EXTRA_SLAVE_OPT" ] || [ x$SLAVE_RUNNING != x1 ] ;
425 426
  then
    EXTRA_SLAVE_OPT=""
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
427
    do_slave_restart=1    
428 429
  fi  
 fi
bk@work.mysql.com's avatar
bk@work.mysql.com committed
430

sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
431 432 433 434
 if [ -f $slave_master_info_file ] ; then
   SLAVE_MASTER_INFO=`cat $slave_master_info_file`
   do_slave_restart=1
 else
435
  if [ ! -z "$SLAVE_MASTER_INFO" ] || [ x$SLAVE_RUNNING != x1 ] ;
sasha@mysql.sashanet.com's avatar
fixed  
sasha@mysql.sashanet.com committed
436 437 438 439 440 441 442 443 444 445 446
  then
    SLAVE_MASTER_INFO=""
    do_slave_restart=1    
  fi  
 fi

 if [ x$do_slave_restart = x1 ] ; then
  stop_slave
  start_slave
 fi

447
 cd $MYSQL_TEST_DIR
448
  
449
 if [ -f $tf ] ; then
450
    $RM -f r/$tname.*.reject
451 452
    mytime=`$TIME -p $MYSQL_TEST -R r/$tname.result $extra_flags \
     < $tf 2> $TIMEFILE`
bk@work.mysql.com's avatar
bk@work.mysql.com committed
453 454
    res=$?

455
    if [ $res == 0 ]; then
456 457 458
	mytime=`$CAT $TIMEFILE | $TR '\n' '-'`

	USERT=`$ECHO $mytime | $CUT -d - -f 2 | $CUT -d ' ' -f 2`
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
459
        USERT=`prefix_to_8 $USERT`
460
	SYST=`$ECHO $mytime | $CUT -d - -f 3 | $CUT -d ' ' -f 2`
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
461
        SYST=`prefix_to_8 $SYST`
462
	REALT=`$ECHO $mytime | $CUT -d - -f 1 | $CUT -d ' ' -f 2`
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
463
        REALT=`prefix_to_8 $REALT`
464
    else
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
465 466 467
	USERT="    ...."
	SYST="    ...."
	REALT="    ...."
468 469
    fi

monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
470
	timestr="$USERT $SYST $REALT"
471
	pname=`$ECHO "$tname                 "|$CUT -c 1-16`
472
	$ECHO -n "$pname          $timestr"
bk@work.mysql.com's avatar
bk@work.mysql.com committed
473 474 475



476 477 478
    if [ $res == 0 ]; then
      total_inc
      pass_inc
479
      $ECHO "$RES_SPACE [ pass ]"
480 481 482
    else
      if [ $res == 1 ]; then
	total_inc
483
        fail_inc
484 485 486
	$ECHO "$RES_SPACE [ fail ]"
        $ECHO
	error_is
487
	$ECHO
488
	if [ x$FORCE != x1 ] ; then
489 490
	 $ECHO "Aborting. To continue, re-run with '--force'."
	 $ECHO
491 492 493 494
	 mysql_stop
	 exit 1
	fi
	 
bk@work.mysql.com's avatar
bk@work.mysql.com committed
495
	mysql_restart
496 497
	$ECHO "Resuming Tests"
	$ECHO
498 499
      else
        pass_inc
500
	$ECHO "$RES_SPACE [ skipped ]"
501
      fi
bk@work.mysql.com's avatar
bk@work.mysql.com committed
502
    fi
503
  fi  
504 505 506 507 508 509 510
}


[ "$DO_GCOV" -a ! -x "$GCOV" ] && error "No gcov found"

[ "$DO_GCOV" ] && gcov_prepare 

511
$ECHO "Installing Test Databases"
512 513
mysql_install_db

514 515
#do not automagically start deamons if we are in gdb or running only one test
#case
516
if [ -z "$DO_GDB" ] && [ -z "$1" ]
517 518 519 520
then
 mysql_start
fi

521
$ECHO  "Loading Standard Test Databases"
522
mysql_loadstd
523

524
$ECHO  "Starting Tests"
525 526

$ECHO
monty@donna.mysql.com's avatar
monty@donna.mysql.com committed
527
$ECHO " TEST                         USER   SYSTEM  ELAPSED        RESULT"
528 529
$ECHO $DASH72

530
if [ -z "$1" ] ;
531
then
532
 if [ x$RECORD = x1 ]; then
533
  $ECHO "Will not run in record mode without a specific test case."
534 535 536 537 538 539
 else
  for tf in $TESTDIR/*.$TESTSUFFIX
  do
    run_testcase $tf
  done
 fi
540
else
541 542
 tname=`$BASENAME $1 .test`
 tf=$TESTDIR/$tname.$TESTSUFFIX
543 544 545
 if [ -f $tf ] ; then
  run_testcase $tf
 else
546
   $ECHO "Test case $tf does not exist."
547
 fi
548
fi
bk@work.mysql.com's avatar
bk@work.mysql.com committed
549

550 551
$ECHO $DASH72
$ECHO
552

553
$RM -f $TIMEFILE
bk@work.mysql.com's avatar
bk@work.mysql.com committed
554

555
if [ -z "$DO_GDB" ] ;
556 557 558
then
    mysql_stop
fi
bk@work.mysql.com's avatar
bk@work.mysql.com committed
559 560

report_stats
561
$ECHO
bk@work.mysql.com's avatar
bk@work.mysql.com committed
562

563
[ "$DO_GCOV" ] && gcov_collect # collect coverage information
564

bk@work.mysql.com's avatar
bk@work.mysql.com committed
565
exit 0