summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-04-08 22:27:43 +0200
committerunknown <knielsen@mysql.com>2006-04-08 22:27:43 +0200
commit5a19f3bc71b9db630fac01561ffc6f37434ac509 (patch)
treef3ada4f846ae4319f6d0f1b3b8484b73adaf420e
parenta024fd69c0ccf8a8281abcc7a2c6eb03db1a1d7b (diff)
downloadmariadb-git-5a19f3bc71b9db630fac01561ffc6f37434ac509.tar.gz
$MYSQL_TEST was broken with --valgrind.
-rwxr-xr-xmysql-test/mysql-test-run.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 53bf820cce9..20bb6e0117a 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2316,11 +2316,6 @@ sub run_mysqltest ($) {
mtr_init_args(\$args);
- if ( defined $opt_valgrind_mysqltest )
- {
- valgrind_arguments($args, \$exe);
- }
-
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'});
mtr_add_arg($args, "--database=test");
@@ -2398,6 +2393,17 @@ sub run_mysqltest ($) {
# Add arguments that should not go into the MYSQL_TEST env var
# ----------------------------------------------------------------------
+ if ( defined $opt_valgrind_mysqltest )
+ {
+ # Prefix the Valgrind options to the argument list.
+ # We do this here, since we do not want to Valgrind the nested invocations
+ # of mysqltest; that would mess up the stderr output causing test failure.
+ my @args_saved = @$args;
+ mtr_init_args(\$args);
+ valgrind_arguments($args, \$exe);
+ mtr_add_arg($args, "%s", $_) for @args_saved;
+ }
+
mtr_add_arg($args, "-R");
mtr_add_arg($args, $tinfo->{'result_file'});