From: John David Duncan Date: May 17 2011 7:23pm Subject: bzr commit into mysql-5.1-telco-7.1 branch (john.duncan:4202) List-Archive: http://lists.mysql.com/commits/137612 Message-Id: <201105171923.p4HJN926017117@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///Users/jdd/bzr-repo/mysql-5.1-telco-7.1/ based on revid:craig.russell@stripped 4202 John David Duncan 2011-05-17 [merge] Merge from working (display Java version number) modified: mysql-test/suite/ndb/include/have_java.inc === modified file 'mysql-test/suite/ndb/include/have_java.inc' --- a/mysql-test/suite/ndb/include/have_java.inc 2010-05-20 11:40:06 +0000 +++ b/mysql-test/suite/ndb/include/have_java.inc 2011-05-17 19:19:34 +0000 @@ -98,6 +98,7 @@ push(@java_paths, @arch_paths); push(@java_paths, "*"); # empty path for "java on PATH variable" my $java_loc = ""; +our $java_version = ""; sub java_exists { my ($path, $exe) = @_; @@ -109,8 +110,16 @@ sub java_exists { $devnull = "NUL" if IS_WINDOWS; system($exists . " " . $java_args . " -version > " . $devnull); + my $ret = $exists if ($? == 0); - return $ret; + if($? == 0) { + my $ret = $exists; + open(VER, "$exists -version 2>&1 |"); + $java_version = ; + close(VER); + } + + return $ret; } foreach my $path (@java_paths) @@ -125,14 +134,14 @@ foreach my $path (@java_paths) # std case $path .= $pathsep . "bin"; } - + my $tmp = java_exists($path, "java"); if ($tmp ne "") { $java_loc = $tmp; last; - } + } } my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR"; @@ -142,7 +151,9 @@ if ($java_loc eq '') { } else { print $F "--let \MTR_JAVA= $java_loc\n"; print $F "--let \MTR_JAVA_ARGS= $java_args\n"; + print $F "--let \MTR_JAVA_VERSION= $java_version\n"; print $F "--echo Found Java: '\$MTR_JAVA'\n"; + print $F "--echo Java version: '\$MTR_JAVA_VERSION'\n"; } $F->close(); No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).