diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2018-10-15 17:35:32 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2018-10-15 17:35:32 (GMT) |
commit | 5eef94f83f4875b64ffe7f9cea05d965bddbd802 (patch) | |
tree | 98e19e98333de2fcdf6f8f9a777528dde879733d /java/examples/intro | |
parent | 6569f208b8f39ace9e442e94ab110bec94c67d37 (diff) | |
parent | f3f29dc7df5f3cc41a5e9462d8c415e540cda3d6 (diff) | |
download | hdf5-5eef94f83f4875b64ffe7f9cea05d965bddbd802.zip hdf5-5eef94f83f4875b64ffe7f9cea05d965bddbd802.tar.gz hdf5-5eef94f83f4875b64ffe7f9cea05d965bddbd802.tar.bz2 |
Merge pull request #1296 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:1.10/master to 1.10/master
* commit 'f3f29dc7df5f3cc41a5e9462d8c415e540cda3d6': (42 commits)
Commit version string changes for HDF5 1.10.4 release.
Merge hdf5_1_10 changes to hdf5_1_10_4.
Merge in changes from hdf5_1_10.
Commit release date change.
Update RELEASE.txt for HDF5 1.10.4 release.
Add notes about unsupported options
Add contents of HDF5 1.10.3 RELEASE.txt to HISTORY-1_10.txt and update RELEASE.txt for continuing development.
Switch maintainer mode to disable, build mode to production, version to 1.10.4, and commit files generated by autogen.sh for release branch hdf5_1_10_4.
HDFFV-10568 fix hdf5_java library dependency
Fix Java library location for testing
Java groups example fix
Update system commands with HD prefix and whitespace
Merge pull request #1224 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
Disable failing tests because of execution issue
Add testfiles to data copy
Same changes needed for examples as test
Correct name of test jar
Only remove test jars
Remove obsolete var
Change prefix in example scripts to relative path to bin. This was done for 1.8, and works wherever installed without the need to replace the original prefix.
...
Diffstat (limited to 'java/examples/intro')
-rw-r--r-- | java/examples/intro/JavaIntroExample.sh.in | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index 077146d..1886485 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -49,12 +49,14 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR # 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_JAR_TESTFILES=" +$HDFLIB_HOME/slf4j-api-1.7.25.jar +$HDFLIB_HOME/ext/slf4j-simple-1.7.25.jar +" LIST_DATA_FILES=" $HDFTEST_HOME/../testfiles/examples.intro.H5_CreateDataset.txt $HDFTEST_HOME/../testfiles/examples.intro.H5_CreateAttribute.txt @@ -69,6 +71,7 @@ $HDFTEST_HOME/../testfiles/examples.intro.H5_ReadWrite.txt # copy files from source dirs to test dir # COPY_LIBFILES="$LIST_LIBRARY_FILES" +COPY_JARTESTFILES="$LIST_JAR_TESTFILES" COPY_LIBFILES_TO_BLDLIBDIR() { @@ -96,6 +99,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() @@ -103,11 +130,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 } @@ -200,11 +230,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 ;; |