diff options
author | unknown <joerg@trift2.> | 2006-11-10 20:02:33 +0100 |
---|---|---|
committer | unknown <joerg@trift2.> | 2006-11-10 20:02:33 +0100 |
commit | 0b2cb6628f9cdb7d0403b1b949b45fe941fff82f (patch) | |
tree | 1e69d75165043cb2f54d32e0c50b354e844d3815 /mysql-test/mysql-test-run-shell.sh | |
parent | e0854cbc145ed961285c397ed4371c5b6b3ef29a (diff) | |
parent | f4113236d091edf3bfe7b407cc4785d507fe6797 (diff) | |
download | mariadb-git-0b2cb6628f9cdb7d0403b1b949b45fe941fff82f.tar.gz |
Merge trift2.:/MySQL/M50/push-5.0
into trift2.:/MySQL/M51/push-5.1
BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
Auto merged
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/install_test_db.sh:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/time.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
Diffstat (limited to 'mysql-test/mysql-test-run-shell.sh')
-rw-r--r-- | mysql-test/mysql-test-run-shell.sh | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh index 99c844b2f78..9c55d879db4 100644 --- a/mysql-test/mysql-test-run-shell.sh +++ b/mysql-test/mysql-test-run-shell.sh @@ -180,18 +180,29 @@ fi # Misc. Definitions #-- -if [ -d ../sql ] ; then +# BASEDIR is always above mysql-test directory ... +MYSQL_TEST_DIR=`pwd` +cd .. + +if [ -d ./sql ] ; then SOURCE_DIST=1 else BINARY_DIST=1 fi -#BASEDIR is always one above mysql-test directory -CWD=`pwd` -cd .. -BASEDIR=`pwd` -cd $CWD -MYSQL_TEST_DIR=$BASEDIR/mysql-test +# ... one level for tar.gz, two levels for a RPM installation +if [ -d ./bin ] ; then + # this is not perfect: we have + # /usr/share/mysql/ # mysql-test-run is here, so this is "$MYSQL_TEST_DIR" + # /usr/bin/ # with MySQL client programs + # so the existence of "/usr/share/bin/" would make this test fail. + BASEDIR=`pwd` +else + cd .. + BASEDIR=`pwd` +fi + +cd $MYSQL_TEST_DIR MYSQL_TEST_WINDIR=$MYSQL_TEST_DIR MYSQLTEST_VARDIR=$MYSQL_TEST_DIR/var export MYSQL_TEST_DIR MYSQL_TEST_WINDIR MYSQLTEST_VARDIR @@ -784,8 +795,15 @@ else if test -x "$BASEDIR/libexec/mysqld" then MYSQLD="$VALGRIND $BASEDIR/libexec/mysqld" - else + elif test -x "$BASEDIR/bin/mysqld" + then MYSQLD="$VALGRIND $BASEDIR/bin/mysqld" + elif test -x "$BASEDIR/sbin/mysqld" + then + MYSQLD="$VALGRIND $BASEDIR/sbin/mysqld" + else + $ECHO "Fatal error: Cannot find program mysqld in $BASEDIR/{libexec,bin,sbin}" 1>&2 + exit 1 fi CLIENT_BINDIR="$BASEDIR/bin" if test -d "$BASEDIR/tests" @@ -1406,7 +1424,7 @@ start_master() then $ECHO "set args $master_args" > $GDB_MASTER_INIT$1 $ECHO "To start gdb for the master , type in another window:" - $ECHO "cd $CWD ; gdb -x $GDB_MASTER_INIT$1 $MASTER_MYSQLD" + $ECHO "cd $MYSQL_TEST_DIR ; gdb -x $GDB_MASTER_INIT$1 $MASTER_MYSQLD" wait_for_master=1500 else ( $ECHO set args $master_args; @@ -1563,7 +1581,7 @@ start_slave() then $ECHO "set args $slave_args" > $GDB_SLAVE_INIT echo "To start gdb for the slave, type in another window:" - echo "cd $CWD ; gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD" + echo "cd $MYSQL_TEST_DIR ; gdb -x $GDB_SLAVE_INIT $SLAVE_MYSQLD" wait_for_slave=1500 else ( $ECHO set args $slave_args; |