[Commits] e1a56e5: MDEV-7643 MTR creates nested links when tests are run with --mem

elenst at montyprogram.com elenst at montyprogram.com
Mon Mar 2 19:18:18 EET 2015


revision-id: e1a56e522979dab56b616c3007191b616c90c291
parent(s): fa87fc733d7855e0e5f9b959ca0bddf772ca57e5
committer: Elena Stepanova
branch nick: 5.5
timestamp: 2015-03-02 19:18:10 +0200
message:

MDEV-7643 MTR creates nested links when tests are run with --mem

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

---
 mysql-test/mysql-test-run.pl |   24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index ce07866..d9322cf 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -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/...
@@ -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 )
   {


More information about the commits mailing list