List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:February 10 2011 10:15am
Subject:bzr commit into mysql-5.5-bugteam branch (joerg:3213)
View as plain text  
#At file:///MySQL/REPO/V55/bug42969-5.5/ based on revid:joerg@stripped

 3213 Joerg Bruehe	2011-02-10
      Fix handling of "INFO_*" files according to first tests.
      
      Part of the work for bug#42969.
     @ cmake/info_macros.cmake.in
        Get rid of some debug output.
     @ mysql-test/r/mysql.result
        Change expected result for the compiler section heading.
     @ mysql-test/t/mysql.test
        Fix the path name handling for the "INFO_*" files:
        tar.gz and RPM have a different storage layout,
        then even RedHat and SuSE differ.
        
        Allow for the different "INFO_BIN" contents
        on Unix vs Windows regarding the compiler.

    modified:
      cmake/info_macros.cmake.in
      mysql-test/r/mysql.result
      mysql-test/t/mysql.test
=== modified file 'cmake/info_macros.cmake.in'
--- a/cmake/info_macros.cmake.in	2011-02-01 13:53:07 +0000
+++ b/cmake/info_macros.cmake.in	2011-02-10 10:15:23 +0000
@@ -52,7 +52,7 @@ MACRO(CREATE_INFO_SRC target_dir)
       RESULT_VARIABLE RESULT
     )
     FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
-    FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
+    # to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
     # For better readability ...
     FILE(APPEND ${INFO_SRC} "\nMySQL source ${VERSION}\n")
   ELSEIF(EXISTS ${INFO_SRC})

=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result	2011-02-07 11:50:19 +0000
+++ b/mysql-test/r/mysql.result	2011-02-10 10:15:23 +0000
@@ -504,6 +504,6 @@ DROP DATABASE connected_db;
 
 Checking 'INFO_SRC' and 'INFO_BIN'
 INFO_SRC: Found MySQL version number / Found BZR revision id
-INFO_BIN: Found 'Compiler flags' line / Found 'Feature flags' line
+INFO_BIN: Found 'Compiler ... used' line / Found 'Feature flags' line
 
 End of tests

=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test	2011-02-07 11:50:19 +0000
+++ b/mysql-test/t/mysql.test	2011-02-10 10:15:23 +0000
@@ -577,7 +577,20 @@ DROP DATABASE connected_db;
 --perl
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
 $dir_docs = $ENV{'MYSQL_LIBDIR'};
-$dir_docs =~ s|/lib|/docs|;
+if($dir_docs =~ m|/usr/|) {
+  # RPM package
+  $dir_docs =~ s|/lib|/share/doc|;
+  if(-d "$dir_docs/packages/MySQL-server") {
+    # SuSE
+    $dir_docs = "$dir_docs/packages/MySQL-server";
+  } else {
+    # RedHat: version number in directory name
+    $dir_docs = glob "$dir_docs/MySQL-server*";
+  }
+} else {
+  # tar.gz package, or Windows
+  $dir_docs =~ s|/lib|/docs|;
+}
 $found_version = "No line 'MySQL source #.#.#'";
 $found_revision = "No line 'revision-id: .....'";
 open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs'\n";
@@ -587,12 +600,14 @@ while(defined ($line = <I_SRC>)) {
 }
 close I_SRC;
 print "INFO_SRC: $found_version / $found_revision\n";
-$found_compiler = "No line 'Compiler flags'";
+$found_compiler = "No line about compiler information";
 $found_features = "No line 'Feature flags'";
 open(I_BIN,"<","$dir_docs/INFO_BIN") or print "Cannot open 'INFO_BIN' in '$dir_docs'\n";
 while(defined ($line = <I_BIN>)) {
-  if ($line =~ m| Compiler flags used |) {$found_compiler = "Found 'Compiler flags' line";}
-  if ($line =~ m| Feature flags used:|) {$found_features = "Found 'Feature flags' line";}
+  # "generator" on Windows, "flags" on Unix:
+  if (($line =~ m| Compiler / generator used: |) ||
+      ($line =~ m| Compiler flags used |))   {$found_compiler = "Found 'Compiler ... used' line";}
+  if  ($line =~ m| Feature flags used:|)     {$found_features = "Found 'Feature flags' line";}
 }
 close I_BIN;
 print "INFO_BIN: $found_compiler / $found_features\n";


Attachment: [text/bzr-bundle] bzr/joerg@mysql.com-20110210101523-11hfj06cg6kjk4gf.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (joerg:3213) Joerg Bruehe10 Feb