From: John David Duncan Date: May 12 2011 8:22pm Subject: bzr push into mysql-5.1-telco-7.1 branch (john.duncan:4190 to 4192) List-Archive: http://lists.mysql.com/commits/137271 Message-Id: <201105122022.p4CKMUP0024169@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4192 John David Duncan 2011-05-12 More improved mtr include tests for clusterj modified: mysql-test/suite/ndb/include/have_connectorj.inc mysql-test/suite/ndb/include/have_openjpa.inc 4191 John David Duncan 2011-05-12 Smarter test for junit jar file. modified: mysql-test/suite/ndb/include/have_junit.inc 4190 Jonas Oreland 2011-05-12 [merge] ndb - merge 70 to 71 modified: mysql-test/suite/ndb/r/ndb_rename.result mysql-test/suite/ndb/t/ndb_rename.test storage/ndb/include/ndbapi/NdbReceiver.hpp storage/ndb/src/common/portlib/CMakeLists.txt storage/ndb/src/common/portlib/Makefile.am storage/ndb/src/common/portlib/NdbTCP.cpp storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp storage/ndb/src/mgmsrv/MgmtSrvr.cpp storage/ndb/src/ndbapi/DictCache.cpp storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp storage/ndb/src/ndbapi/NdbOperationExec.cpp storage/ndb/src/ndbapi/NdbQueryOperation.cpp storage/ndb/src/ndbapi/NdbReceiver.cpp storage/ndb/src/ndbapi/NdbScanOperation.cpp === modified file 'mysql-test/suite/ndb/include/have_connectorj.inc' --- a/mysql-test/suite/ndb/include/have_connectorj.inc 2010-02-03 10:11:55 +0000 +++ b/mysql-test/suite/ndb/include/have_connectorj.inc 2011-05-12 20:06:27 +0000 @@ -6,15 +6,35 @@ use IO::File; # Looks for MySQL Connector/J JAR file in MTR_CLASSPATH # +my $ok = 0; my $classpath = $ENV{'MTR_CLASSPATH'} || ''; - my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR"; +my $jar; +my $notfound; + +# -- look for the Connctor/J jar file +foreach $jar (split ':', $classpath) { + if($jar =~ m/mysql-connector/ && -f $jar) { + $ok = 2; + } + elsif($jar =~ m/mysql-connector/) { + $ok = 1; + $notfound = $jar; + } +} + +# -- write the result to the output file my $F = IO::File->new("$vardir/tmp/have_connectorj_result.inc", "w") or die; -if ($classpath =~ m/mysql-connector-java/) { - print $F "--echo Found Connector/J JAR in MTR_CLASSPATH\n"; -} else { - print $F "--skip Could not find Connector/J JAR file in MTR_CLASSPATH env variable\n"; +if($ok == 2) { + print $F "--echo Found Connector/J JAR in MTR_CLASSPATH\n"; +} +elsif($ok == 1) { + print $F "--skip JAR file not found: \"$notfound\"\n"; +} +else { + print $F "--skip Please specify Connector/J JAR file in MTR_CLASSPATH env variable\n"; } + $F->close(); EOF === modified file 'mysql-test/suite/ndb/include/have_junit.inc' --- a/mysql-test/suite/ndb/include/have_junit.inc 2010-02-03 10:11:55 +0000 +++ b/mysql-test/suite/ndb/include/have_junit.inc 2011-05-12 16:04:16 +0000 @@ -2,19 +2,35 @@ use strict; use IO::File; -# -# Looks for JUnit JAR file in MTR_CLASSPATH -# - +my $ok = 0; my $classpath = $ENV{'MTR_CLASSPATH'} || ''; - my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR"; +my $jar; +my $notfound; + +# -- look for the junit jar file +foreach $jar (split ':', $classpath) { + if($jar =~ m/junit/ && -f $jar) { + $ok = 2; + } + elsif($jar =~ m/junit/) { + $ok = 1; + $notfound = $jar; + } +} + +# -- write the result to the output file my $F = IO::File->new("$vardir/tmp/have_junit_result.inc", "w") or die; -if ($classpath =~ m/junit/) { - print $F "--echo Found JUnit JAR in MTR_CLASSPATH\n"; -} else { - print $F "--skip Could not find JUnit JAR file, please set MTR_CLASSPATH env variable\n"; +if($ok == 2) { + print $F "--echo Found JUnit JAR in MTR_CLASSPATH\n"; +} +elsif($ok == 1) { + print $F "--skip JAR file not found: \"$notfound\"\n"; +} +else { + print $F "--skip Please specify Junit JAR file in MTR_CLASSPATH env variable\n"; } + $F->close(); EOF === modified file 'mysql-test/suite/ndb/include/have_openjpa.inc' --- a/mysql-test/suite/ndb/include/have_openjpa.inc 2010-02-03 10:11:55 +0000 +++ b/mysql-test/suite/ndb/include/have_openjpa.inc 2011-05-12 20:06:27 +0000 @@ -1,25 +1,41 @@ --perl -use strict; - -use IO::File; - # # Look for Apache OpenJPA library, if not found: skip test. # -# -# Set up paths -# -my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR"; +use strict; +use IO::File; +my $ok = 0; my $classpath = $ENV{'MTR_CLASSPATH'} || ''; +my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR"; +my $jar; +my $notfound; +# -- look for the openjpa jar file +foreach $jar (split ':', $classpath) { + if($jar =~ m/openjpa/ && -f $jar) { + $ok = 2; + } + elsif($jar =~ m/openjpa/) { + $ok = 1; + $notfound = $jar; + } +} + +# -- write the result to the output file my $F = IO::File->new("$vardir/tmp/have_openjpa_result.inc", 'w') or die; -if ($classpath =~ m/openjpa/g) { + +if($ok == 2) { print $F "--echo Found clusterj-openjpa.jar in MTR_CLASSPATH\n" -} else { - print $F "skip Could not find Apache OpenJPA jar in MTR_CLASSPATH ($classpath)\n"; +} +elsif($ok == 1) { + print $F "--skip JAR file not found: \"$notfound\"\n"; +} +else { + print $F "--skip Could not find Apache OpenJPA jar in MTR_CLASSPATH ($classpath)\n"; } + $F->close(); EOF No bundle (reason: useless for push emails).