diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-08-24 15:27:42 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-08-24 15:27:42 (GMT) |
commit | cb9797f49785ac0481cd428924e4bf7fb4fef775 (patch) | |
tree | 41e33795db377262ddfa18b47f43494448aa6475 /java/examples/groups/JavaGroupExample.sh.in | |
parent | 0f7e13cdb5d159d54d3b01be72cd94b6c52836ca (diff) | |
parent | a02414cc24e01096a239fc774ce94c38655f53ce (diff) | |
download | hdf5-cb9797f49785ac0481cd428924e4bf7fb4fef775.zip hdf5-cb9797f49785ac0481cd428924e4bf7fb4fef775.tar.gz hdf5-cb9797f49785ac0481cd428924e4bf7fb4fef775.tar.bz2 |
Merge pull request #1222 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'a02414cc24e01096a239fc774ce94c38655f53ce':
Revert testfile FILE change
change FILE path
Add testfiles to data copy
Same changes needed for examples as test
Correct name of test jar
Only remove test jars
Remove obsolete var
Correct name of osx installer
DT location incorrect
Diffstat (limited to 'java/examples/groups/JavaGroupExample.sh.in')
-rw-r--r-- | java/examples/groups/JavaGroupExample.sh.in | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 36df02e..b4e21bd 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -51,17 +51,17 @@ test -d $BLDREFDIR || mkdir -p $BLDREFDIR # Comment '#' without space can be used. # -------------------------------------------------------------------- LIST_LIBRARY_FILES=" -$HDFLIB_HOME/slf4j-api-1.7.25.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar $top_builddir/src/.libs/libhdf5.* $top_builddir/java/src/jni/.libs/libhdf5_java.* $top_builddir/java/src/$JARFILE " -LIST_REF_FILES=" -$HDFTEST_HOME/h5ex_g_iterate.h5 -$HDFTEST_HOME/h5ex_g_visit.h5 +LIST_JAR_TESTFILES=" +$HDFLIB_HOME/slf4j-api-1.7.25.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar " LIST_DATA_FILES=" +$HDFTEST_HOME/h5ex_g_iterate.h5 +$HDFTEST_HOME/h5ex_g_visit.h5 $HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Create.txt $HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Iterate.txt $HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Compact.txt @@ -75,6 +75,7 @@ $HDFTEST_HOME/../testfiles/examples.groups.H5Ex_G_Visit.txt # copy files from source dirs to test dir # COPY_LIBFILES="$LIST_LIBRARY_FILES" +COPY_JARTESTFILES="$LIST_JAR_TESTFILES" COPY_LIBFILES_TO_BLDLIBDIR() { @@ -102,6 +103,30 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done + # copy jar files. Used -f to make sure get a new copy + for tstfile in $COPY_JARTESTFILES + 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() @@ -109,11 +134,14 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail - SDIR=`$DIRNAME $HDFLIB_HOME/slf4j-api-1.7.25.jar` + SDIR=$HDFLIB_HOME 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 - $RM $BLDLIBDIR + for tstfile in $COPY_JARTESTFILES + do + $RM $BLDLIBDIR/tstfile + done fi } @@ -152,6 +180,7 @@ CLEAN_DATAFILES_AND_BLDDIR() $RM $BLDDIR/examples.groups.H5Ex_G_*.txt $RM $BLDDIR/H5Ex_G_*.out $RM $BLDDIR/H5Ex_G_*.h5 + $RM $BLDDIR/h5ex_g_*.h5 SDIR=`$DIRNAME $tstfile` INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'` @@ -257,11 +286,6 @@ if $TEST -z "$LD_LIBRARY_PATH" ; then fi case $os_name in - Darwin) - DYLD_LIBRARY_PATH=$BLDLIBDIR:$DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - ;; *) LD_LIBRARY_PATH=$BLDLIBDIR:$LD_LIBRARY_PATH ;; |