List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:February 25 2009 2:19pm
Subject:bzr commit into mysql-6.0-bugteam branch (df:3038) Bug#42888
View as plain text  
#At file:///Users/df/bzr/mysql-6.0-build-42888/ based on revid:df@stripped

 3038 Daniel Fischer	2009-02-25 [merge]
      bug#42888 merge to 6.0
      modified:
        mysql-test/collections/README.experimental
        mysql-test/lib/mtr_report.pm
        mysql-test/mysql-test-run.pl

=== modified file 'mysql-test/collections/README.experimental'
--- a/mysql-test/collections/README.experimental	2009-02-24 11:53:34 +0000
+++ b/mysql-test/collections/README.experimental	2009-02-25 14:00:17 +0000
@@ -11,7 +11,7 @@ The syntax is as follows:
 
 2) Empty lines and lines starting with a hash (#) are ignored.
 
-3) If any other line contains a black followed by a hash (#), the hash 
+3) If any other line contains a blank followed by a hash (#), the hash 
    and any subsequent characters are ignored.
 
 4) The full test case name including the suite and execution mode

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2009-02-24 12:00:08 +0000
+++ b/mysql-test/lib/mtr_report.pm	2009-02-25 14:18:08 +0000
@@ -109,10 +109,10 @@ sub mtr_report_test ($) {
   my ($tinfo)= @_;
   my $test_name = _mtr_report_test_name($tinfo);
 
-  my $comment=      $tinfo->{'comment'};
-  my $logfile=      $tinfo->{'logfile'};
-  my $warnings=     $tinfo->{'warnings'};
-  my $result=       $tinfo->{'result'};
+  my $comment=  $tinfo->{'comment'};
+  my $logfile=  $tinfo->{'logfile'};
+  my $warnings= $tinfo->{'warnings'};
+  my $result=   $tinfo->{'result'};
 
   if ($result eq 'MTR_RES_FAILED'){
 
@@ -123,14 +123,20 @@ sub mtr_report_test ($) {
     {
       # Find out if this test case is an experimental one, so we can treat
       # the failure as an expected failure instead of a regression.
-      for my $exp ( @$::opt_experimental ) {
+      for my $exp ( @$::experimental_test_cases ) {
         if ( $exp ne $test_name ) {
+          # if the expression is not the name of this test case, but has
+          # an asterisk at the end, determine if the characters up to
+          # but excluding the asterisk are the same
           if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) {
             $exp = substr($exp, 0, length($exp) - 1);
             if ( substr($test_name, 0, length($exp)) ne $exp ) {
+              # no match, try next entry
               next;
             }
+            # if yes, fall through to set the exp-fail status
           } else {
+            # no match, try next entry
             next;
           }
         }

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-02-24 12:00:08 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-02-25 14:18:08 +0000
@@ -174,6 +174,7 @@ my $config; # The currently running conf
 my $current_config_name; # The currently running config file template
 
 our $opt_experimental;
+our $experimental_test_cases;
 
 my $baseport;
 my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto";
@@ -977,24 +978,29 @@ sub command_line_setup {
 
   if ( $opt_experimental )
   {
-    if ( open(FILE, "<", $opt_experimental) ) {
-      mtr_report("Using experimental file: $opt_experimental");
-      $opt_experimental = [];
-      while(<FILE>) {
-        chomp;
-        s/( +|^)#.*$//;
-        s/^ +//;
-        s/ +$//;
-        if ( $_ eq "" ) {
-          next;
-        }
-        print " - $_\n";
-        push @$opt_experimental, $_;
-      }
-      close FILE;
-    } else {
-      mtr_error("Can't read experimental file: $opt_experimental");      
+    # read the list of experimental test cases from the file specified on
+    # the command line
+    open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental");
+    mtr_report("Using experimental file: $opt_experimental");
+    $experimental_test_cases = [];
+    while(<FILE>) {
+      chomp;
+      # remove comments (# foo) at the beginning of the line, or after a 
+      # blank at the end of the line
+      s/( +|^)#.*$//;
+      # remove whitespace
+      s/^ +//;              
+      s/ +$//;
+      # if nothing left, don't need to remember this line
+      if ( $_ eq "" ) {
+        next;
+      }
+      # remember what is left as the name of another test case that should be
+      # treated as experimental
+      print " - $_\n";
+      push @$experimental_test_cases, $_;
     }
+    close FILE;
   }
 
   foreach my $arg ( @ARGV )

Thread
bzr commit into mysql-6.0-bugteam branch (df:3038) Bug#42888Daniel Fischer25 Feb