diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-09-01 15:01:56 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-09-01 15:01:56 (GMT) |
commit | a033634b6a29dabb82b23889c10807db57614499 (patch) | |
tree | fa38a912d34f802629cecab41bae61a2a7d5d1c0 /java | |
parent | 2ee65646c3afb31194864d36a20817c44b42e677 (diff) | |
parent | e1f4d0c5d2bae6eaf5b347cea17c58522d62ca92 (diff) | |
download | hdf5-a033634b6a29dabb82b23889c10807db57614499.zip hdf5-a033634b6a29dabb82b23889c10807db57614499.tar.gz hdf5-a033634b6a29dabb82b23889c10807db57614499.tar.bz2 |
Merge pull request #1231 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_10 to hdf5_1_10Base_1_10_4
* commit 'e1f4d0c5d2bae6eaf5b347cea17c58522d62ca92':
HDFFV-10568 fix hdf5_java library dependency
Fix Java library location for testing
Java groups example fix
Diffstat (limited to 'java')
-rw-r--r-- | java/examples/groups/JavaGroupExample.sh.in | 43 | ||||
-rw-r--r-- | java/src/jni/CMakeLists.txt | 14 |
2 files changed, 21 insertions, 36 deletions
diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 9d68a58..9d4673f 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -148,7 +148,6 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() } COPY_DATAFILES="$LIST_DATA_FILES" -COPY_ITERFILES="$LIST_ITER_FILES" COPY_DATAFILES_TO_BLDDIR() { @@ -255,7 +254,7 @@ JAVAEXEFLAGS=@H5_JAVAFLAGS@ # prepare for test COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR -COPY_REFFILES_TO_BLDITERDIR +COPY_ITERFILES_TO_BLDITERDIR CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.25.jar:"$BLDLIBDIR"/slf4j-simple-1.7.25.jar:"$TESTJARFILE"" @@ -306,16 +305,15 @@ else nerrors="`expr $nerrors + 1`" fi -# Disabled -# echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" -# TESTING examples.groups.H5Ex_G_Iterate -# ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) -# if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then -# echo " PASSED groups.H5Ex_G_Iterate" -# else -# echo "**FAILED** groups.H5Ex_G_Iterate" -# nerrors="`expr $nerrors + 1`" -# fi +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate" +TESTING examples.groups.H5Ex_G_Iterate +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Iterate > H5Ex_G_Iterate.out) +if diff H5Ex_G_Iterate.out examples.groups.H5Ex_G_Iterate.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Iterate" +else + echo "**FAILED** groups.H5Ex_G_Iterate" + nerrors="`expr $nerrors + 1`" +fi echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Compact" TESTING examples.groups.H5Ex_G_Compact @@ -357,21 +355,20 @@ else nerrors="`expr $nerrors + 1`" fi -# Disabled -# echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" -# TESTING examples.groups.H5Ex_G_Visit -# ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) -# if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then -# echo " PASSED groups.H5Ex_G_Visit" -# else -# echo "**FAILED** groups.H5Ex_G_Visit" -# nerrors="`expr $nerrors + 1`" -# fi +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit" +TESTING examples.groups.H5Ex_G_Visit +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH examples.groups.H5Ex_G_Visit > H5Ex_G_Visit.out) +if diff H5Ex_G_Visit.out examples.groups.H5Ex_G_Visit.txt > /dev/null; then + echo " PASSED groups.H5Ex_G_Visit" +else + echo "**FAILED** groups.H5Ex_G_Visit" + nerrors="`expr $nerrors + 1`" +fi # Clean up temporary files/directories +CLEAN_ITERFILES_AND_BLDITERDIR CLEAN_LIBFILES_AND_BLDLIBDIR CLEAN_DATAFILES_AND_BLDDIR -CLEAN_ITERFILES_AND_BLDITERDIR # Report test results and exit if test $nerrors -eq 0 ; then diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index a0228e1..7b95e0b 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -50,22 +50,10 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS}) target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR}) TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED) -target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA") -if (WIN32) - get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE) - set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}$<$<CONFIG:Debug>:_D>") - # message (STATUS "HDF5_JAVA_JNI_DLL_NAME: ${HDF5_JAVA_JNI_DLL_NAME}") - if (BUILD_TESTING) - add_custom_target (HDF5_JAVA_JNI-Test-Copy ALL - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} - COMMENT "Copying ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" - ) - add_dependencies (HDF5_JAVA_JNI-Test-Copy ${HDF5_JAVA_JNI_LIB_TARGET}) - endif () -endif () #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects |