summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/examples/datasets/runExample.sh.in2
-rw-r--r--java/examples/datatypes/runExample.sh.in2
-rw-r--r--java/examples/groups/runExample.sh.in2
-rw-r--r--java/examples/intro/runExample.sh.in2
-rw-r--r--java/test/junit.sh.in33
5 files changed, 34 insertions, 7 deletions
diff --git a/java/examples/datasets/runExample.sh.in b/java/examples/datasets/runExample.sh.in
index 83b06ec..440de33 100644
--- a/java/examples/datasets/runExample.sh.in
+++ b/java/examples/datasets/runExample.sh.in
@@ -38,7 +38,7 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="./lib"
+BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
HDFTEST_HOME="$top_srcdir/java/examples/datasets"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
diff --git a/java/examples/datatypes/runExample.sh.in b/java/examples/datatypes/runExample.sh.in
index f80450e..1b02774 100644
--- a/java/examples/datatypes/runExample.sh.in
+++ b/java/examples/datatypes/runExample.sh.in
@@ -35,7 +35,7 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="./lib"
+BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
HDFTEST_HOME="$top_srcdir/java/examples/datatypes"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
diff --git a/java/examples/groups/runExample.sh.in b/java/examples/groups/runExample.sh.in
index 7dddc6d..665b307 100644
--- a/java/examples/groups/runExample.sh.in
+++ b/java/examples/groups/runExample.sh.in
@@ -35,7 +35,7 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="./lib"
+BLDLIBDIR="$top_builddir/hdf5/lib"
BLDREFDIR="./groups"
BLDDIR="."
HDFTEST_HOME="$top_srcdir/java/examples/groups"
diff --git a/java/examples/intro/runExample.sh.in b/java/examples/intro/runExample.sh.in
index 60ea765..a8e65ff 100644
--- a/java/examples/intro/runExample.sh.in
+++ b/java/examples/intro/runExample.sh.in
@@ -35,7 +35,7 @@ nerrors=0
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="./lib"
+BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
HDFTEST_HOME="$top_srcdir/java/examples/intro"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in
index 5001c32..a9a71cb 100644
--- a/java/test/junit.sh.in
+++ b/java/test/junit.sh.in
@@ -39,7 +39,7 @@ myos=`uname -s`
# where the libs exist
HDFLIB_HOME="$top_srcdir/java/lib"
-BLDLIBDIR="$top_builddir/java/lib"
+BLDLIBDIR="$top_builddir/hdf5/lib"
BLDDIR="."
HDFTEST_HOME="$top_srcdir/java/test"
JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar
@@ -55,12 +55,14 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_LIBRARY_FILES="
+$top_builddir/src/.libs/libhdf5.*
+$top_builddir/java/src/jni/.libs/libhdf5_java.*
+"
+LIST_JAR_FILES="
$HDFLIB_HOME/hamcrest-core.jar
$HDFLIB_HOME/junit.jar
$HDFLIB_HOME/slf4j-api-1.7.5.jar
$HDFLIB_HOME/ext/slf4j-simple-1.7.5.jar
-$top_builddir/src/.libs/libhdf5.*
-$top_builddir/java/src/jni/.libs/libhdf5_java.*
$top_builddir/java/src/$JARFILE
"
LIST_DATA_FILES="
@@ -77,6 +79,7 @@ actual_ext="JUnit-interface.ext"
# copy files from source dirs to test dir
#
COPY_LIBFILES="$LIST_LIBRARY_FILES"
+COPY_JARFILES="$LIST_JAR_FILES"
COPY_LIBFILES_TO_BLDLIBDIR()
{
@@ -104,6 +107,30 @@ COPY_LIBFILES_TO_BLDLIBDIR()
fi
fi
done
+ # copy jar files. Used -f to make sure get a new copy
+ for tstfile in $COPY_JARFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $BLDLIBDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
}
CLEAN_LIBFILES_AND_BLDLIBDIR()