List:Commits« Previous MessageNext Message »
From:msvensson Date:March 25 2008 3:09pm
Subject:bk commit into 5.1 tree (msvensson:1.2545)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2008-03-25 16:08:58+01:00, msvensson@stripped +1 -0
  Group all code to find extra suites together
  Fix problem with infinite loop by using splitdir to split the path
  Use a hash to map clone name -> extr suite

  mysql-test/mysql-test-run.pl@stripped, 2008-03-25 16:08:55+01:00, msvensson@stripped +19 -24
    Group all code to find extra suites together
    Fix problem with infinite loop by using splitdir to split the path
    Use a hash to map clone name -> extr suite

diff -Nrup a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
--- a/mysql-test/mysql-test-run.pl	2008-02-26 09:32:00 +01:00
+++ b/mysql-test/mysql-test-run.pl	2008-03-25 16:08:55 +01:00
@@ -62,6 +62,7 @@ use File::Path;
 use File::Basename;
 use File::Copy;
 use File::Temp qw /tempdir/;
+use File::Spec::Functions qw /splitdir/;
 use Cwd;
 use Getopt::Long;
 use IO::Socket;
@@ -134,17 +135,6 @@ our $default_vardir;
 our $opt_usage;
 our $opt_suites;
 our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run
-our @extra_suites=
-(
- ["mysql-5.1-new-ndb",         "ndb_team"],
- ["mysql-5.1-new-ndb-merge",   "ndb_team"],
- ["mysql-5.1-telco-6.2",       "ndb_team"],
- ["mysql-5.1-telco-6.2-merge", "ndb_team"],
- ["mysql-5.1-telco-6.3",       "ndb_team"],
- ["mysql-6.0-ndb",             "ndb_team"],
-);
-
-
 our $opt_script_debug= 0;  # Script debugging, enable with --script-debug
 our $opt_verbose= 0;  # Verbose output, enable with --verbose
 
@@ -414,22 +404,27 @@ sub main () {
     # Figure out which tests we are going to run
     if (!$opt_suites)
     {
-      # use default and add any extra_suites as defined
       $opt_suites= $opt_suites_default;
-      my $ccc= dirname($glob_mysql_test_dir);
-      my $found= 1; # BUG#34761 - disable this feature
-      while (!$found and !($ccc eq "/") and !($ccc eq ""))
+
+      # Check for any extra suites to enable based on the path name
+      my %extra_suites=
+	(
+	 "mysql-5.1-new-ndb"              => "ndb_team",
+	 "mysql-5.1-new-ndb-merge"        => "ndb_team",
+	 "mysql-5.1-telco-6.2"            => "ndb_team",
+	 "mysql-5.1-telco-6.2-merge"      => "ndb_team",
+	 "mysql-5.1-telco-6.3"            => "ndb_team",
+	 "mysql-6.0-ndb"                  => "ndb_team",
+	);
+
+      foreach my $dir ( reverse splitdir($glob_basedir) )
       {
-	my $ddd= basename($ccc);
-	foreach my $extra_suite (@extra_suites)
-	{
-	  if ($extra_suite->[0] eq "$ddd")
-	  {
-	    $opt_suites= "$extra_suite->[1],$opt_suites";
-	    $found= 1;
-	  }
+	my $extra_suite= $extra_suites{$dir};
+	if (defined $extra_suite){
+	  mtr_report("Found extra suite: $extra_suite");
+	  $opt_suites= "$extra_suite,$opt_suites";
+	  last;
 	}
-	$ccc= dirname($ccc);
       }
     }
 
Thread
bk commit into 5.1 tree (msvensson:1.2545)msvensson25 Mar