10 # Look for Cluster/J JPA library, if not found: skip test. 
   16 my $vardir = $ENV{MYSQLTEST_VARDIR} or die 
"Need MYSQLTEST_VARDIR";
 
   17 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die 
"Need MYSQL_TEST_DIR";
 
   18 my $basedir = dirname($mysql_test_dir);
 
   21 # Check if the needed jars are available 
   23 my $clusterj_jpa_jar = my_find_file($basedir,
 
   24                                 [
"storage/ndb/clusterj/clusterj-openjpa", 
 
   25                                  "share/mysql/java",             # install unix
 
   26                                  "lib/java"],                    # install windows
 
   27                                 "clusterjpa-*.jar", NOT_REQUIRED);
 
   29 my $clusterj_jpa_test_jar = my_find_file($basedir,
 
   30                                     [
"storage/ndb/clusterj/clusterj-jpatest", 
 
   31                                      "share/mysql/java",             # install unix
 
   32                                      "lib/java"],                    # install windows
 
   33                                     "clusterj-jpatest-*.jar", NOT_REQUIRED);
 
   35 my $F = IO::File->new(
"$vardir/tmp/have_clusterj_jpa_result.inc", 
'w') or die;
 
   36 if ($clusterj_jpa_jar) {
 
   37   print $F 
"--let \$CLUSTERJ_JPA_JAR= $clusterj_jpa_jar\n"; 
 
   38   print $F 
"--echo Found clusterj-openjpa.jar: '\$CLUSTERJ_JPA_JAR'\n" 
   40   print $F 
"skip Could not find clusterj jpa jar file\n";
 
   43 if ($clusterj_jpa_test_jar) {
 
   44   print $F 
"--let \$CLUSTERJ_JPA_TEST_JAR= $clusterj_jpa_test_jar\n";
 
   45   print $F 
"--echo Found clusterj_jpa_test jar: '\$CLUSTERJ_JPA_TEST_JAR'\n" 
   47   print $F 
"skip Could not find clusterj jpa test jar file\n";
 
   54 --source $MYSQLTEST_VARDIR/tmp/have_clusterj_jpa_result.inc