From b4bc448eba986c5a1daecb8c70df8b093402bd10 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Oct 2003 16:12:21 +0100 Subject: [PATCH] Fix to be able to run mysql-test-run --manager --valgrind (without this fix, the manager fails to start mysqld and the tests hang). mysql-test/mysql-test-run.sh: When running with --manager: the MySQL manager wants the complete path of the executable (it uses execv(), not execvp(), so does not search in the $PATH, so telling him to start 'valgrind' is not enough, it wants '/usr/bin/valgrind' or so). So this is a fix to be able to mysql-test-run --manager --valgrind Plus a warning (previously, if valgrind was not installed, tests silently hanged when run with --valgrind). --- mysql-test/mysql-test-run.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index d155c02c652..cd409e1ace5 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -336,7 +336,13 @@ while test $# -gt 0; do EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb" ;; --valgrind) - VALGRIND="valgrind --alignment=8 --leak-check=yes --num-callers=16" + VALGRIND=`which valgrind` # this will print an error if not found + # Give good warning to the user and stop + if [ -z "$VALGRIND" ] ; then + $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://developer.kde.org/~sewardj ." + exit 1 + fi + VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb" SLEEP_TIME_AFTER_RESTART=10