Skip to content

Commit

Permalink
MDEV-7643 MTR creates nested links when tests are run with --mem
Browse files Browse the repository at this point in the history
1) fix 5.5.42 vs 5.5.41 problem, nested links;
2) fix older MariaDB vs MySQL problem, var_auto_** dirs were not
   removed from the tmpfs location.
Both problems were caused by vardir being expanded to real path
too early, in two different places in the script code
  • Loading branch information
elenst committed Mar 9, 2015
1 parent 17a3779 commit 34f37aa
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1024,15 +1024,7 @@ sub ignore_option {

# Setup any paths that are $opt_vardir related
sub set_vardir {
my ($vardir)= @_;
if(IS_WINDOWS)
{
$opt_vardir= $vardir;
}
else
{
$opt_vardir= realpath($vardir);
}
($opt_vardir)= @_;

$path_vardir_trace= $opt_vardir;
# Chop off any "c:", DBUG likes a unix path ex: c:/src/... => /src/...
Expand Down Expand Up @@ -1486,15 +1478,11 @@ sub command_line_setup {
# --------------------------------------------------------------------------
# Set the "var/" directory, the base for everything else
# --------------------------------------------------------------------------
if(defined $ENV{MTR_BINDIR})
{
$default_vardir= "$ENV{MTR_BINDIR}/mysql-test/var";
}
else
{
$default_vardir= "$glob_mysql_test_dir/var";
}
$default_vardir = realpath $default_vardir unless IS_WINDOWS;
my $vardir_location= (defined $ENV{MTR_BINDIR}
? "$ENV{MTR_BINDIR}/mysql-test"
: $glob_mysql_test_dir);
$vardir_location= realpath $vardir_location unless IS_WINDOWS;
$default_vardir= "$vardir_location/var";

if ( ! $opt_vardir )
{
Expand Down

0 comments on commit 34f37aa

Please sign in to comment.