# The ":s" in the argument spec, means we have three different cases
#
# undefined option not set
# "" option set with no argument
# "somestring" option is name/path of valgrind executable
if(defined$opt_valgrind_alland!$opt_valgrind)
{
$opt_valgrind=$opt_valgrind_all;
}
if(!$opt_testcase_timeout)
{
$opt_testcase_timeout=$default_testcase_timeout;
$opt_testcase_timeout*=10ifdefined$opt_valgrind;
}
#if ( $opt_valgrind or $opt_valgrind_all )
#{
# VALGRIND=`which valgrind` # this will print an error if not found FIXME
# Give good warning to the user and stop
# if ( ! $VALGRIND )
# {
# print "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org.\n"
# exit 1
# }
if(!$opt_suite_timeout)
{
$opt_suite_timeout=$default_suite_timeout;
$opt_suite_timeout*=4ifdefined$opt_valgrind;
}
if(defined$opt_valgrind)
{
$opt_sleep_time_after_restart=10;
$opt_sleep_time_for_delete=60;
# >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr