List:Internals« Previous MessageNext Message »
From:msvensson Date:December 9 2005 5:52pm
Subject:bk commit into 5.0 tree (msvensson:1.1980)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1980 05/12/09 17:52:29 msvensson@neptunus.(none) +1 -0
  Made it easier to valgrind mysqltest

  mysql-test/mysql-test-run.pl
    1.58 05/12/09 17:52:24 msvensson@neptunus.(none) +27 -6
    Append mysqltest-time to mysqltest.log at the end of each test case, thus making it
possibel to run the whole testsuite with --valgrind-mysqltest and then check the valgrind
ouput in mysqltest.log
    Don't valgrind mysqld when only --valgrind-mysqltest is specified
    Fix usage --valgrind, will only valgrind mysqld(that's how it was, I didn't change)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/wl2930/my50-wl2930

--- 1.57/mysql-test/mysql-test-run.pl	2005-11-03 19:09:56 +01:00
+++ 1.58/mysql-test/mysql-test-run.pl	2005-12-09 17:52:24 +01:00
@@ -151,6 +151,7 @@
 our $path_language;
 our $path_timefile;
 our $path_manager_log;           # Used by mysqldadmin
+our $path_mysqltest_log;
 our $path_slave_load_tmpdir;     # What is this?!
 our $path_my_basedir;
 our $opt_vardir;                 # A path but set directly on cmd line
@@ -270,6 +271,7 @@
 our $opt_user_test;
 
 our $opt_valgrind;
+our $opt_valgrind_mysqld;
 our $opt_valgrind_mysqltest;
 our $opt_valgrind_all;
 our $opt_valgrind_options;
@@ -742,6 +744,7 @@
   #   "somestring" option is name/path of valgrind executable
 
   # Take executable path from any of them, if any
+  $opt_valgrind_mysqld= $opt_valgrind;
   $opt_valgrind= $opt_valgrind_mysqltest if $opt_valgrind_mysqltest;
   $opt_valgrind= $opt_valgrind_all       if $opt_valgrind_all;
 
@@ -885,6 +888,7 @@
   }
 
   $path_timefile=  "$opt_vardir/log/mysqltest-time";
+  $path_mysqltest_log=  "$opt_vardir/log/mysqltest.log";
 }
 
 
@@ -929,7 +933,19 @@
     }
     else
     {
-      $exe_mysqltest=  mtr_exe_exists("$path_client_bindir/mysqltest");
+      if ( $opt_valgrind_mysqltest )
+      {
+        # client/mysqltest might be a libtool .sh script, so look for real exe
+        # to avoid valgrinding bash ;)
+        $exe_mysqltest=
+  	  mtr_exe_exists("$path_client_bindir/.libs/lt-mysqltest",
+		         "$path_client_bindir/.libs/mysqltest",
+		         "$path_client_bindir/mysqltest");
+      }
+      else
+      {
+        $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+      }
       $exe_mysql_client_test=
         mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
 		       "/usr/bin/false");
@@ -1859,6 +1875,11 @@
       }
       report_failure_and_restart($tinfo);
     }
+    # Save info from this testcase run to mysqltest.log
+    mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
+    my $testcase_log= mtr_fromfile($path_timefile);
+    mtr_tofile($path_mysqltest_log,
+	       $testcase_log);
   }
 
   # ----------------------------------------------------------------------
@@ -2019,7 +2040,7 @@
   mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
   mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
 
-  if ( defined $opt_valgrind )
+  if ( defined $opt_valgrind_mysqld )
   {
     mtr_add_arg($args, "%s--skip-safemalloc", $prefix);
     mtr_add_arg($args, "%s--skip-bdb", $prefix);
@@ -2245,7 +2266,7 @@
 
   mtr_init_args(\$args);
 
-  if ( defined $opt_valgrind )
+  if ( defined $opt_valgrind_mysqld )
   {
     valgrind_arguments($args, \$exe);
   }
@@ -2699,6 +2720,7 @@
     mtr_add_arg($args, split(' ', $opt_valgrind_options));
   }
 
+
   mtr_add_arg($args, $$exe);
 
   $$exe= $opt_valgrind || "valgrind";
@@ -2778,9 +2800,8 @@
 
   gcov                  FIXME
   gprof                 FIXME
-  valgrind[=EXE]        Run the "mysqltest" executable as well as the "mysqld"
-                        server using valgrind, optionally specifying the
-                        executable path/name
+  valgrind[=EXE]        Run the "mysqld" server using valgrind, optionally
+                        specifying the executable path/name
   valgrind-mysqltest[=EXE] In addition, run the "mysqltest" executable with valgrind
   valgrind-all[=EXE]    Adds verbose flag, and --show-reachable to valgrind
   valgrind-options=ARGS Extra options to give valgrind
Thread
bk commit into 5.0 tree (msvensson:1.1980)msvensson9 Dec