summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/mysql-test-run.sh')
-rw-r--r--mysql-test/mysql-test-run.sh44
1 files changed, 29 insertions, 15 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index ab4a5354dae..137e99f48b3 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -194,7 +194,7 @@ USER_TEST=
EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
-USE_RUNNING_SERVER=1
+USE_RUNNING_SERVER=""
DO_GCOV=""
DO_GDB=""
MANUAL_GDB=""
@@ -210,6 +210,7 @@ CHARACTER_SET=latin1
DBUSER=""
START_WAIT_TIMEOUT=10
STOP_WAIT_TIMEOUT=10
+TEST_REPLICATION=0
MYSQL_TEST_SSL_OPTS=""
while test $# -gt 0; do
@@ -287,6 +288,9 @@ while test $# -gt 0; do
--user-test=*)
USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"`
;;
+ --rpl)
+ TEST_REPLICATION=1
+ ;;
--mysqld=*)
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP"
@@ -337,7 +341,7 @@ while test $# -gt 0; do
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc"
SLEEP_TIME_AFTER_RESTART=10
- SLEEP_TIME_FOR_DELETE=120
+ SLEEP_TIME_FOR_DELETE=60
USE_RUNNING_SERVER=""
;;
--valgrind-options=*)
@@ -623,13 +627,15 @@ report_stats () {
$RM -f $MY_LOG_DIR/warnings $MY_LOG_DIR/warnings.tmp
# Remove some non fatal warnings from the log files
$SED -e 's!Warning: Table:.* on delete!!g' \
- $MY_LOG_DIR/*.err > $MY_LOG_DIR/warnings.tmp
+ $MY_LOG_DIR/*.err \
+ | $SED -e 's!Warning: Table:.* on rename!!g' \
+ > $MY_LOG_DIR/warnings.tmp
found_error=0
# Find errors
for i in "^Warning:" "^Error:" "^==.* at 0x"
do
- if `$GREP "$i" $MY_LOG_DIR/warnings.tmp >> $MY_LOG_DIR/warnings`
+ if $GREP "$i" $MY_LOG_DIR/warnings.tmp >> $MY_LOG_DIR/warnings
then
found_error=1
fi
@@ -813,8 +819,6 @@ start_master()
if [ x$MASTER_RUNNING = x1 ] || [ x$LOCAL_MASTER = x1 ] ; then
return
fi
- # Remove old berkeley db log files that can confuse the server
- $RM -f $MASTER_MYDDIR/log.*
# Remove stale binary logs
$RM -f $MYSQL_TEST_DIR/var/log/master-bin.*
# Remove old master.info and relay-log.info files
@@ -1322,6 +1326,9 @@ then
# Remove files that can cause problems
$RM -f $MYSQL_TEST_DIR/var/run/* $MYSQL_TEST_DIR/var/tmp/*
+ # Remove old berkeley db log files that can confuse the server
+ $RM -f $MASTER_MYDDIR/log.*
+
wait_for_master=$SLEEP_TIME_FOR_FIRST_MASTER
wait_for_slave=$SLEEP_TIME_FOR_FIRST_SLAVE
$ECHO "Installing Test Databases"
@@ -1373,15 +1380,22 @@ $ECHO $DASH72
if [ -z "$1" ] ;
then
- if [ x$RECORD = x1 ]; then
- $ECHO "Will not run in record mode without a specific test case."
- else
- for tf in `ls -1 $TESTDIR/*.$TESTSUFFIX | $SORT`
- do
- run_testcase $tf
- done
- $RM -f $TIMEFILE # Remove for full test
- fi
+ if [ x$RECORD = x1 ]; then
+ $ECHO "Will not run in record mode without a specific test case."
+ else
+ if [ x$TEST_REPLICATION = x1 ]; then
+ for tf in `ls -1 $TESTDIR/*.$TESTSUFFIX | $SORT`
+ do
+ run_testcase $tf
+ done
+ else
+ for tf in $TESTDIR/*.$TESTSUFFIX
+ do
+ run_testcase $tf
+ done
+ fi
+ $RM -f $TIMEFILE # Remove for full test
+ fi
else
while [ ! -z "$1" ]; do
tname=`$BASENAME $1 .test`