Commit d6d28017 authored by unknown's avatar unknown

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).
parent fcc29ff6
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment