From: Joerg Bruehe Date: March 11 2011 3:00pm Subject: bzr commit into mysql-5.5 branch (joerg.bruehe:3366) List-Archive: http://lists.mysql.com/commits/132842 Message-Id: <201103111501.p2BF1uLI027236@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1415716166025333880==" --===============1415716166025333880== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///MySQL/REPO/V55/mysql-5.5/ based on revid:bjorn.munch@stripped 3366 Joerg Bruehe 2011-03-11 Fight a problem in internal test builds: When a RPM test build in a non-release branch is done, the $MYSQL_BINDIR variable ends in "/usr" (rather than in "/usr/lib" as in a RPM release build), this made test "file_contents" fail. A branch for this case is added to the test. The test result is unchanged. @ mysql-test/t/file_contents.test Fight a problem in internal test builds: When a RPM test build in a non-release branch is done, the $MYSQL_BINDIR variable ends in "/usr" (rather than in "/usr/lib" as in a RPM release build), this made test "file_contents" fail. Because of this, the old logic did not recognize that a RPM build is done (trailing '/' missing!) and took the tar.gz branch. Just removing the trailing '/' from the "/usr" is not enough, as the logic for RPMs used to replace "/lib" which is not present at all; rather, a new branch was added. To help in case of future problems, the error messages for a failing "open()" now also report "$MYSQL_BINDIR". modified: mysql-test/t/file_contents.test === modified file 'mysql-test/t/file_contents.test' --- a/mysql-test/t/file_contents.test 2011-02-16 12:44:28 +0000 +++ b/mysql-test/t/file_contents.test 2011-03-11 15:00:53 +0000 @@ -10,9 +10,10 @@ --perl print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n"; -$dir_docs = $ENV{'MYSQL_BINDIR'}; -if($dir_docs =~ m|/usr/|) { +$dir_bin = $ENV{'MYSQL_BINDIR'}; +if ($dir_bin =~ m|/usr/|) { # RPM package + $dir_docs = $dir_bin; $dir_docs =~ s|/lib|/share/doc|; if(-d "$dir_docs/packages/MySQL-server") { # SuSE @@ -21,8 +22,19 @@ if($dir_docs =~ m|/usr/|) { # RedHat: version number in directory name $dir_docs = glob "$dir_docs/MySQL-server*"; } +} elsif ($dir_bin =~ m|/usr$|) { + # RPM build during development + $dir_docs = "$dir_bin/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, Windows, or developer work (in BZR) + $dir_docs = $dir_bin; $dir_docs =~ s|/lib||; if(-d "$dir_docs/docs") { $dir_docs = "$dir_docs/docs"; # package @@ -32,7 +44,7 @@ if($dir_docs =~ m|/usr/|) { } $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"; +open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n"; while(defined ($line = )) { if ($line =~ m|^MySQL source \d\.\d\.\d+|) {$found_version = "Found MySQL version number";} if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";} @@ -41,7 +53,7 @@ close I_SRC; print "INFO_SRC: $found_version / $found_revision\n"; $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"; +open(I_BIN,"<","$dir_docs/INFO_BIN") or print "Cannot open 'INFO_BIN' in '$dir_docs' (starting from bindir '$dir_bin')\n"; while(defined ($line = )) { # "generator" on Windows, "flags" on Unix: if (($line =~ m| Compiler / generator used: |) || --===============1415716166025333880== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/joerg.bruehe@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: joerg.bruehe@stripped # target_branch: file:///MySQL/REPO/V55/mysql-5.5/ # testament_sha1: a505339a93fa30abff833129d76fd33eb3d8e8f6 # timestamp: 2011-03-11 16:00:57 +0100 # source_branch: file:///MySQL/REPO/V55/clone-5.5/ # base_revision_id: bjorn.munch@stripped\ # 0dx94tedzs9x8y9m # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWcM0NXMAApDfgEAQfPf//393 /aS/////YAau+ty63yA7qIG9uIehpaEkiCek0yap7U0wT0CmBoTCYmJo0NNAeoYgyQCZMjQjJT0n qDIaeoDQA0AAAGQ4aaYIZDTTIyYQDTQBhNGmTAAgaDFNFT9KZpA9Ro0NHpHqGgxDIGg0ANBppoG1 SZGinqbFPUHqPTUAAPUAZNDQAAAAkSEE1Nk0mTFTzU8hqntJNqaBmpk9NTQNAAZHBdXZSsRis/21 5sn+P1MUMeWBvXHfqknUUKyaMvRYXviGLYnAmf6yo7UKKqfUodCSQSZlgCjWAMSRobuDwdhGWhAH 5WUoMhfyVFBnuL+JZ8XuwbaVf6BsZfS2XNKjNE2YTzugk+L3qKl0xTRQzrPqRM4ZsAGrODCIWxMI NpOWc8u2MZ44hNRsuesm+SkrXCp1r7/nynNqzNqz3SokKlhB+tmYcMKuvOKl2CEecVsyLoLlYYje JNWoQDeNmgTAI8NLB+woLEBXgomkdHaVMYD5jkzni5BsEpDtbxIe+Svf3K7sLZWMvp3T9pXxyI0K w09dq2UShKDM3SMsGT1nxkpqjHIki3WeGOeLAzDDvzwS3Mi8a9HrynwZqsJUVZiwdnrIF6vqWUzL EIdudKux32pkFVRGeC4ZtaBwvfHinLrkzJGQociNY2KIbjJ1WQFHhrlnRAkN/EBMZMi/sCHcjBFK KWjTeVaYugidmIYSpPYE1rhFar5WkghhcJhiIBKGKRTyRviyty5BBGqDqFpTxTawGZVTl1tokeXO WKmG4/zOdiJhkwEoBo1mbtTLJG6MMIVcojTkCKx5ownmbCZ1IEuGVLw4I86lKFMS/TCVyDbeOGkB gp6yqKoL2ro96zMKUxKFN9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a+hkDooGyJSUlMETSVRwF5TJdbFe4hSQzK8uqDkA oPj0ZLC8VCFfqVctlCp2kfVilNd8wjHah1sLyCE343lDVOSJFY1uVhOrawKWYV7G3FFgwgxfySwv 1BHppLrS5+9UpUKDCcyDyDvBvflZeZzsHKQbMrCBYzjO/PWT/UmdLI9SiaWhlEvMD15ZSItg4NjF CcDi/NiMialcE1jDRVvAlZX7+0L545AJ9AG3cmtKd9cLsWBLghz6ozOxScbVRClZpZDXRTo0EQSW b5CPHJYDXKjAi2qwpkmVwPTD22yI0eOs/4u5IpwoSGGaGrmA --===============1415716166025333880==--