summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.sh
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-06-08 19:26:11 -0600
committersasha@mysql.sashanet.com <>2001-06-08 19:26:11 -0600
commita6788beace6a020db7a0c28a402637b459aa4bf6 (patch)
tree2686922d9044bcd3e7b746e168c2560b74ed3ed3 /mysql-test/mysql-test-run.sh
parentbd115b913b8968718794295fde2a6dc8cee33045 (diff)
parent24f89c754ae9d7b8c40c7ae89857ce5d928fad9e (diff)
downloadmariadb-git-a6788beace6a020db7a0c28a402637b459aa4bf6.tar.gz
Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
Diffstat (limited to 'mysql-test/mysql-test-run.sh')
-rw-r--r--mysql-test/mysql-test-run.sh34
1 files changed, 29 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 2e282718b96..dd9fa8514ee 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -125,6 +125,7 @@ USE_RUNNING_SERVER=1
DO_GCOV=""
DO_GDB=""
DO_DDD=""
+DO_CLIENT_GDB=""
SLEEP_TIME=2
DBUSER=""
@@ -166,13 +167,19 @@ while test $# -gt 0; do
;;
--gdb )
if [ x$BINARY_DIST = x1 ] ; then
- $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with -gdb option"
+ $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --gdb option"
fi
DO_GDB=1
;;
+ --client-gdb )
+ if [ x$BINARY_DIST = x1 ] ; then
+ $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --client-gdb option"
+ fi
+ DO_CLIENT_GDB=1
+ ;;
--ddd )
if [ x$BINARY_DIST = x1 ] ; then
- $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with -gdb option"
+ $ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --ddd option"
fi
DO_DDD=1
;;
@@ -274,7 +281,10 @@ then
fi
-MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent -v --tmpdir=$MYSQL_TMP_DIR"
+MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent -v --tmpdir=$MYSQL_TMP_DIR"
+MYSQL_TEST_BIN=$MYSQL_TEST
+MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS"
+GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client
GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
GCOV_MSG=$MYSQL_TMP_DIR/mysqld-gcov.out
@@ -317,6 +327,15 @@ show_failed_diff ()
fi
}
+do_gdb_test ()
+{
+ mysql_test_args="$MYSQL_TEST_ARGS $1"
+ $ECHO "set args $mysql_test_args < $2" > $GDB_CLIENT_INIT
+ echo "Set breakpoints ( if needed) and type 'run' in gdb window"
+ #this xterm should not be backgrounded
+ xterm -title "Client" -e gdb -x $GDB_CLIENT_INIT $MYSQL_TEST_BIN
+}
+
error () {
$ECHO "Error: $1"
exit 1
@@ -697,8 +716,13 @@ run_testcase ()
if [ -f $tf ] ; then
$RM -f r/$tname.*reject
- mytime=`$TIME -p $MYSQL_TEST -R r/$tname.result $EXTRA_MYSQL_TEST_OPT \
- < $tf 2> $TIMEFILE`
+ mysql_test_args="-R r/$tname.result $EXTRA_MYSQL_TEST_OPT"
+ if [ -z "$DO_CLIENT_GDB" ] ; then
+ mytime=`$TIME -p $MYSQL_TEST $mysql_test_args < $tf 2> $TIMEFILE`
+ else
+ do_gdb_test "$mysql_test_args" "$tf"
+ fi
+
res=$?
if [ $res = 0 ]; then