diff options
Diffstat (limited to 'java')
56 files changed, 153 insertions, 314 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 63547df..5380bd1 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -9622,6 +9622,38 @@ public class H5 implements java.io.Serializable { public synchronized static native int H5Pset_hyper_vector_size(long dxpl_id, long vector_size) throws HDF5LibraryException, NullPointerException; + /** + * + * Set flag to indicate that an API wrapper for a plugin's + * public wrapper API call (e.g. H5VLfile_create, H5FDopen, etc) + * should open a new API context for the API call. + * + * @param dxpl_id + * IN: Dataset transfer property list identifier. + * @param new_api_ctx + * IN: Indicate that API wrapper should create new API context + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5Pset_plugin_new_api_context(long dxpl_id, boolean new_api_ctx) + throws HDF5LibraryException; + + /** + * Retrieve "new API context" flag for plugin wrapper API calls. + * + * @param dxpl_id + * IN: Dataset transfer property list identifier. + * + * @return true if the given dxpl indicates API wrapper should create new API context + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * + **/ + public synchronized static native boolean H5Pget_plugin_new_api_context(long dxpl_id) + throws HDF5LibraryException; + // /////// Link creation property list (LCPL) routines /////// /** @@ -13460,7 +13492,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id); + public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id) throws HDF5LibraryException; /** * H5VLregister_connector_by_value registers a new VOL connector as a member of the virtual object layer class. * @@ -13475,7 +13507,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id); + public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id) throws HDF5LibraryException; /** * H5VLis_connector_registered_by_name tests whether a VOL class has been registered. * @@ -13487,7 +13519,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native boolean H5VLis_connector_registered_by_name(String name); + public synchronized static native boolean H5VLis_connector_registered_by_name(String name) throws HDF5LibraryException; /** * H5VLis_connector_registered_by_value tests whether a VOL class has been registered. * @@ -13499,7 +13531,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value); + public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value) throws HDF5LibraryException; /** * H5VLget_connector_id retrieves the ID for a registered VOL connector for a given object. * @@ -13511,7 +13543,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5VLget_connector_id(long object_id); + public synchronized static native long H5VLget_connector_id(long object_id) throws HDF5LibraryException; /** * H5VLget_connector_id_by_name retrieves the ID for a registered VOL connector. * @@ -13523,7 +13555,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5VLget_connector_id_by_name(String name); + public synchronized static native long H5VLget_connector_id_by_name(String name) throws HDF5LibraryException; /** * H5VLget_connector_id_by_value retrieves the ID for a registered VOL connector. * @@ -13535,7 +13567,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native long H5VLget_connector_id_by_value(int connector_value); + public synchronized static native long H5VLget_connector_id_by_value(int connector_value) throws HDF5LibraryException; /** * H5VLget_connector_name returns the connector name for the VOL associated with the * object or file ID. @@ -13548,7 +13580,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native String H5VLget_connector_name(long object_id); + public synchronized static native String H5VLget_connector_name(long object_id) throws HDF5LibraryException; /** * H5VLclose closes a VOL connector ID. * @@ -13558,7 +13590,7 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native void H5VLclose(long connector_id); + public synchronized static native void H5VLclose(long connector_id) throws HDF5LibraryException; /** * H5VLunregister_connector removes a VOL connector ID from the library. * @@ -13568,7 +13600,17 @@ public class H5 implements java.io.Serializable { * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native void H5VLunregister_connector(long connector_id); + public synchronized static native void H5VLunregister_connector(long connector_id) throws HDF5LibraryException; + + /** + * H5VLfapl_is_native queries if a FAPL will use the native VOL connector. + * + * @param fapl_id + * The ID of the FAPL to query. + * @return true if fapl_id uses the native VOL connector. + * + **/ + public synchronized static native boolean H5VLfapl_is_native(long fapl_id) throws HDF5LibraryException; // /////// unimplemented //////// // hid_t H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id); diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index dff0a88..ab306ef 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -73,14 +73,6 @@ set (HDF5_JAVA_JNI_CHDRS ${HDF5_JAVA_JNI_SOURCE_DIR}/nativeData.h ) -set (HDF5_JAVA_TEST_CSRCS - ${HDF5_JAVA_JNI_SOURCE_DIR}/h5jni_test.c -) - -set (HDF5_JAVA_TEST_CHDRS - ${HDF5_JAVA_JNI_SOURCE_DIR}/h5jni_test.h -) - set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) ########### JNI libraries always must be built shared ############### @@ -95,18 +87,6 @@ set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/j 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") -# Build Testing library -add_library (${HDF5_JAVA_JNI_TEST_LIB_TARGET} SHARED ${HDF5_JAVA_TEST_CSRCS} ${HDF5_JAVA_TEST_CHDRS}) -target_include_directories (${HDF5_JAVA_JNI_TEST_LIB_TARGET} - PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" -) -target_compile_options(${HDF5_JAVA_JNI_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}") -TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_TEST_LIB_TARGET} SHARED) -target_link_libraries (${HDF5_JAVA_JNI_TEST_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET}) -set_target_properties (${HDF5_JAVA_JNI_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/jni) -#SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_TEST_LIB_TARGET}") -H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_TEST_LIB_TARGET} ${HDF5_JAVA_JNI_TEST_LIB_NAME} SHARED "JAVA") - #----------------------------------------------------------------------------- # Add Target to clang-format #----------------------------------------------------------------------------- diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index d17d3d1..bf086d2 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -25,15 +25,12 @@ JAVA_API=yes AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/java/src/jni $(JNIFLAGS) # This is our main target -lib_LTLIBRARIES=libhdf5_java.la libhdf5_java_test.la +lib_LTLIBRARIES=libhdf5_java.la # Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) libhdf5_java_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) -# Add libtool numbers to the HDF5 Java (JNI) library (from config/lt_vers.am) -libhdf5_java_test_la_LDFLAGS = -avoid-version -shared -export-dynamic -version-info $(LT_JAVA_VERS_INTERFACE):$(LT_JAVA_VERS_REVISION):$(LT_JAVA_VERS_AGE) $(AM_LDFLAGS) - -# Source files for the main Java library +# Source files for the library libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp.c \ h5aImp.c h5dImp.c h5eImp.c h5fImp.c h5gImp.c h5iImp.c h5lImp.c h5oImp.c \ h5pImp.c h5pACPLImp.c h5pDAPLImp.c h5pDCPLImp.c h5pDXPLImp.c \ @@ -41,13 +38,7 @@ libhdf5_java_la_SOURCES=exceptionImp.c h5Constants.c nativeData.c h5util.c h5Imp h5pOCPLImp.c h5pOCpyPLImp.c h5pStrCPLImp.c h5plImp.c h5rImp.c h5sImp.c h5tImp.c \ h5vlImp.c h5zImp.c -# Source files for the Java testing library -libhdf5_java_test_la_SOURCES=h5jni_test.c - # HDF5 Java (JNI) library depends on HDF5 Library. libhdf5_java_la_LIBADD=$(LIBHDF5) -# HDF5 Java (JNI) Testing library depends on HDF5 Library and Java Library. -libhdf5_java_test_la_LIBADD=$(LIBHDF5) libhdf5_java.la - include $(top_srcdir)/config/conclude.am diff --git a/java/src/jni/h5jni_test.c b/java/src/jni/h5jni_test.c deleted file mode 100644 index 02f6a78..0000000 --- a/java/src/jni/h5jni_test.c +++ /dev/null @@ -1,53 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* - * For details of the HDF libraries, see the HDF Documentation at: - * http://hdfgroup.org/HDF5/doc/ - * - */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include <jni.h> -#include <stdlib.h> -#include "hdf5.h" -#include "H5VLprivate.h" -#include "h5jni.h" -#include "h5jni_test.h" - -/* - * Class: test_H5TestUtils - * Method: H5VLfapl_is_native - * Signature: (J)Z - */ -JNIEXPORT jboolean JNICALL -Java_test_H5TestUtils_H5VLfapl_1is_1native(JNIEnv *env, jclass clss, jlong fapl_id) -{ - hbool_t bval = JNI_FALSE; - - UNUSED(clss); - - if (H5VL_fapl_is_native((hid_t)fapl_id, &bval) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; - -done: - return (jboolean)bval; -} - -#ifdef __cplusplus -} /* end extern "C" */ -#endif /* __cplusplus */ diff --git a/java/src/jni/h5jni_test.h b/java/src/jni/h5jni_test.h deleted file mode 100644 index 9f1968b..0000000 --- a/java/src/jni/h5jni_test.h +++ /dev/null @@ -1,34 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include <jni.h> -/* Header for HDF5 JNI test routines */ - -#ifndef Included_h5jni_test -#define Included_h5jni_test - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * Class: test_H5TestUtils - * Method: H5VLfapl_is_native - * Signature: (J)Z - */ -JNIEXPORT jboolean JNICALL Java_test_H5TestUtils_H5VLfapl_1is_1native(JNIEnv *, jclass, jlong); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif /* __cplusplus */ - -#endif /* Included_h5jni_test */ diff --git a/java/src/jni/h5pDXPLImp.c b/java/src/jni/h5pDXPLImp.c index c555d53..12618a6 100644 --- a/java/src/jni/h5pDXPLImp.c +++ b/java/src/jni/h5pDXPLImp.c @@ -448,6 +448,52 @@ done: } /* end Java_hdf_hdf5lib_H5_H5Pget_1btree_1ratios */ /* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_plugin_new_api_context + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context(JNIEnv *env, jclass clss, jlong dcpl_id, + jboolean new_api_ctx) +{ + hbool_t new_api_ctx_val; + herr_t retVal = FAIL; + + UNUSED(clss); + + new_api_ctx_val = (JNI_TRUE == new_api_ctx) ? TRUE : FALSE; + + if ((retVal = H5Pset_plugin_new_api_context((hid_t)dcpl_id, (hbool_t)new_api_ctx_val)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return; +} /* end Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_plugin_new_api_context + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context(JNIEnv *env, jclass clss, jlong dcpl_id) +{ + hbool_t new_api_ctx = FALSE; + jboolean bval = JNI_FALSE; + + UNUSED(clss); + + if (H5Pget_plugin_new_api_context((hid_t)dcpl_id, (hbool_t *)&new_api_ctx) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (new_api_ctx == TRUE) + bval = JNI_TRUE; + +done: + return bval; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context */ + +/* * TODO: H5Pset_vlen_mem_manager */ diff --git a/java/src/jni/h5pDXPLImp.h b/java/src/jni/h5pDXPLImp.h index 21c40c4..c03d61c 100644 --- a/java/src/jni/h5pDXPLImp.h +++ b/java/src/jni/h5pDXPLImp.h @@ -134,6 +134,21 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1btree_1ratios(JNIEnv *, jclas jdoubleArray, jdoubleArray); /* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_plugin_new_api_context + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Pset_1plugin_1new_1api_1context(JNIEnv *, jclass, jlong, + jboolean); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_plugin_new_api_context + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Pget_1plugin_1new_1api_1context(JNIEnv *, jclass, jlong); + +/* * TODO: H5Pset_vlen_mem_manager */ diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 4272205..2550ad9 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -658,8 +658,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) int ret_value = FAIL; - if (!h5str_append(out_str, " \"")) - H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); buf_size = H5Rget_file_name(ref_vp, NULL, 0); if (buf_size) { ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1); @@ -697,8 +695,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p) ref_name = NULL; } } - if (!h5str_append(out_str, "\"")) - H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); ret_value = SUCCEED; done: @@ -725,6 +721,10 @@ h5str_region_dataset(JNIEnv *env, h5str_t *out_str, H5R_ref_t *ref_vp, int expan if ((new_obj_sid = H5Ropen_region(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) < 0) H5_LIBRARY_ERROR(ENVONLY); + if (expand_data == 0) + if (h5str_sprint_reference(ENVONLY, out_str, ref_vp) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + if ((region_type = H5Sget_select_type(new_obj_sid)) > H5S_SEL_ERROR) { if (H5S_SEL_POINTS == region_type) { if (h5str_dump_region_points(ENVONLY, out_str, new_obj_sid, new_obj_id, expand_data) < 0) diff --git a/java/src/jni/h5vlImp.c b/java/src/jni/h5vlImp.c index 40f8863..ae56e56 100644 --- a/java/src/jni/h5vlImp.c +++ b/java/src/jni/h5vlImp.c @@ -278,6 +278,27 @@ done: return; } /* end Java_hdf_hdf5lib_H5_H5VLunregister_1connector */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5VLfapl_is_native + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5VLfapl_1is_1native(JNIEnv *env, jclass clss, jlong fapl_id) +{ + hbool_t bval = JNI_FALSE; + + UNUSED(clss); + + if (H5VLfapl_is_native((hid_t)fapl_id, &bval) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; + +done: + return (jboolean)bval; +} + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5vlImp.h b/java/src/jni/h5vlImp.h index a17807f..0cc3366 100644 --- a/java/src/jni/h5vlImp.h +++ b/java/src/jni/h5vlImp.h @@ -93,6 +93,13 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5VLclose(JNIEnv *, jclass, jlong); */ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5VLunregister_1connector(JNIEnv *, jclass, jlong); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5VLfapl_is_native + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5VLfapl_1is_1native(JNIEnv *, jclass, jlong); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 44c95cb..ffaf5f5 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -5,10 +5,6 @@ set (CMAKE_VERBOSE_MAKEFILE 1) set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_JNI_BINARY_DIR};${HDF5_JAVA_HDF5_LIB_DIR}") -set (HDF5_JAVA_TEST_JAR_SOURCES - H5TestUtils.java -) - set (HDF5_JAVA_TEST_SOURCES TestH5 TestH5Eparams @@ -72,19 +68,7 @@ if (HDF5_ENABLE_HDFS) ) endif () -set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR};${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") - -file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt -" -" -) - -# Build Testing JAR -add_jar (${HDF5_JAVA_TEST_LIB_TARGET} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_TEST_JAR_SOURCES}) -add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET} ${HDF5_JAVA_HDF5_LIB_TARGET}) -get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_TEST_LIB_TARGET} JAR_FILE) - -set (CMAKE_JAVA_INCLUDE_PATH "${CMAKE_JAVA_INCLUDE_PATH};${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") +set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR}") foreach (test_file ${HDF5_JAVA_TEST_SOURCES}) @@ -100,7 +84,6 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES}) #get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_CLASSPATH ${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} CLASSDIR) add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_HDF5_LIB_TARGET}) - add_dependencies (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} ${HDF5_JAVA_TEST_LIB_TARGET}) set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET}_${test_file} PROPERTIES FOLDER test/java) endforeach () @@ -137,7 +120,6 @@ if (HDF5_TEST_JAVA AND HDF5_TEST_SERIAL) foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}) set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}") endforeach () - set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE}") set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF5_JAVA_TEST_LIB_TARGET}_${test_file}_JAR_FILE}") add_test ( diff --git a/java/test/H5TestUtils.java b/java/test/H5TestUtils.java deleted file mode 100644 index c96e856..0000000 --- a/java/test/H5TestUtils.java +++ /dev/null @@ -1,77 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright by The HDF Group. * - * All rights reserved. * - * * - * This file is part of HDF5. The full HDF5 copyright notice, including * - * terms governing use, modification, and redistribution, is contained in * - * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://www.hdfgroup.org/licenses. * - * If you do not have access to either file, you may request a copy from * - * help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -package test; - -import hdf.hdf5lib.H5; -import hdf.hdf5lib.HDF5Constants; -import hdf.hdf5lib.exceptions.HDF5Exception; -import hdf.hdf5lib.exceptions.HDF5JavaException; -import hdf.hdf5lib.exceptions.HDF5LibraryException; - -/** - * This class contains testing routines for the Java interface which are - * public, but are not meant for general use. - **/ -public class H5TestUtils { - - private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(H5TestUtils.class); - - private static boolean isLibraryLoaded = false; - - static { - loadH5TestLib(); - } - - /** - * load native testing library - */ - public static void loadH5TestLib() { - String s_libraryName = null; - String mappedName = null; - - // Make sure that the library is loaded only once - if (isLibraryLoaded) - return; - - try { - s_libraryName = "hdf5_java_test"; - mappedName = System.mapLibraryName(s_libraryName); - System.loadLibrary("hdf5_java_test"); - isLibraryLoaded = true; - } - catch (Throwable err) { - err.printStackTrace(); - isLibraryLoaded = false; - } - finally { - log.info("HDF5 Java test library: " + s_libraryName); - log.debug(" resolved to: " + mappedName + "; "); - log.info((isLibraryLoaded ? "" : " NOT") + " successfully loaded from java.library.path"); - } - - /* Important! Disable error output to C stdout */ - if (!log.isDebugEnabled()) - H5.H5error_off(); - } - - /** - * H5VLfapl_is_native queries if a FAPL will use the native VOL connector. - * - * @param fapl_id - * The ID of the FAPL to query. - * @return true if fapl_id uses the native VOL connector. - * - **/ - public synchronized static native boolean H5VLfapl_is_native(long fapl_id) throws HDF5LibraryException; - -} diff --git a/java/test/Makefile.am b/java/test/Makefile.am index b69e019..ac3b619 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -36,8 +36,7 @@ AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation TESTPACKAGE = noinst_JAVA = \ - H5TestUtils.java \ - TestH5.java \ + TestH5.java \ TestH5Eparams.java \ TestH5Eregister.java \ TestH5Fparams.java \ diff --git a/java/test/TestH5.java b/java/test/TestH5.java index a5d0063..1f298f3 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -34,8 +34,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index 77652e3..f2134d2 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -30,8 +30,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5A_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Arw.java b/java/test/TestH5Arw.java index a144ab7..8ce2fee 100644 --- a/java/test/TestH5Arw.java +++ b/java/test/TestH5Arw.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5A_iterate_t; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 8b34516..dac3a9c 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5D_iterate_t; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java index 91a2d33..3661139 100644 --- a/java/test/TestH5Dparams.java +++ b/java/test/TestH5Dparams.java @@ -15,7 +15,6 @@ package test; import static org.junit.Assert.assertTrue; import hdf.hdf5lib.H5; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index cfd9661..774b9dd 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Drw.java b/java/test/TestH5Drw.java index 782245f..69fb9d7 100644 --- a/java/test/TestH5Drw.java +++ b/java/test/TestH5Drw.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.callbacks.H5D_iterate_t; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index d4a9c82..cad0a06 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -27,8 +27,6 @@ import hdf.hdf5lib.callbacks.H5E_walk_cb; import hdf.hdf5lib.callbacks.H5E_walk_t; import hdf.hdf5lib.structs.H5E_error2_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java index e807e27..9e93cea 100644 --- a/java/test/TestH5Edefault.java +++ b/java/test/TestH5Edefault.java @@ -18,7 +18,6 @@ import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java index 2e40e94..e55f1fc 100644 --- a/java/test/TestH5Eparams.java +++ b/java/test/TestH5Eparams.java @@ -27,8 +27,6 @@ import hdf.hdf5lib.callbacks.H5E_walk_cb; import hdf.hdf5lib.callbacks.H5E_walk_t; import hdf.hdf5lib.structs.H5E_error2_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java index cec51c2..99e8e5f 100644 --- a/java/test/TestH5Eregister.java +++ b/java/test/TestH5Eregister.java @@ -15,7 +15,6 @@ package test; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import hdf.hdf5lib.H5; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index d016b27..16786b9 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -23,8 +23,6 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index 9310feb..4f3d928 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index accca98..0376485 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; import hdf.hdf5lib.structs.H5F_info2_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java index 88d683b..1ec78fe 100644 --- a/java/test/TestH5Fswmr.java +++ b/java/test/TestH5Fswmr.java @@ -22,8 +22,6 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index cf51100..edf2cbe 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -25,8 +25,6 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5G_info_t; import hdf.hdf5lib.structs.H5O_token_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index 017452b..6e2e450 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5G_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java index 7eb44b7..388d2ac 100644 --- a/java/test/TestH5Giterate.java +++ b/java/test/TestH5Giterate.java @@ -20,7 +20,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5G_info_t; import hdf.hdf5lib.structs.H5O_token_t; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index 40397bf..a28fc3d 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -25,8 +25,6 @@ import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5L_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index 11c6d2c..44af2e5 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -27,8 +27,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5L_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java index 4a1ce7e..30ee242 100644 --- a/java/test/TestH5Lparams.java +++ b/java/test/TestH5Lparams.java @@ -16,8 +16,6 @@ import static org.junit.Assert.assertTrue; import hdf.hdf5lib.H5; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index 4ab60bd..350b7aa 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -29,8 +29,6 @@ import hdf.hdf5lib.structs.H5O_token_t; import hdf.hdf5lib.structs.H5O_hdr_info_t; import hdf.hdf5lib.structs.H5_ih_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java index df646ca..b3b1acd 100644 --- a/java/test/TestH5Ocopy.java +++ b/java/test/TestH5Ocopy.java @@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index 3fc0f29..774a78d 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -27,8 +27,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5O_info_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; @@ -278,7 +276,7 @@ public class TestH5Ocreate { @Test public void testH5Oget_info_externallink() { - if (H5TestUtils.H5VLfapl_is_native(HDF5Constants.H5P_DEFAULT)) { + if (H5.H5VLfapl_is_native(HDF5Constants.H5P_DEFAULT)) { H5O_info_t obj_info = null; _createExternalLink(H5fid, H5_EXTFILE, "DT1", H5fid, "L1", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java index 3a6f602..5cbabe1 100644 --- a/java/test/TestH5Oparams.java +++ b/java/test/TestH5Oparams.java @@ -16,7 +16,6 @@ import static org.junit.Assert.assertTrue; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index 9db1e5a..3879128 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5F_info2_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index 9bf458c..8b04629 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index 738ff39..d44cc0b 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -17,7 +17,6 @@ import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 7d96aec..a65b52e 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -28,8 +28,6 @@ import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.exceptions.HDF5PropertyListInterfaceException; import hdf.hdf5lib.structs.H5AC_cache_config_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java index 2631f99..d922666 100644 --- a/java/test/TestH5Pfaplhdfs.java +++ b/java/test/TestH5Pfaplhdfs.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5FD_hdfs_fapl_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java index 48b1cfa..dda2716 100644 --- a/java/test/TestH5Pfapls3.java +++ b/java/test/TestH5Pfapls3.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5FD_ros3_fapl_t; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index 429915b..0d53071 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -44,7 +44,6 @@ import hdf.hdf5lib.callbacks.H5P_iterate_t; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.structs.H5AC_cache_config_t; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java index f82cfab..0478356 100644 --- a/java/test/TestH5Pvirtual.java +++ b/java/test/TestH5Pvirtual.java @@ -24,8 +24,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index 381ed08..031b8e4 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5Rref.java b/java/test/TestH5Rref.java index b682d95..5733aae 100644 --- a/java/test/TestH5Rref.java +++ b/java/test/TestH5Rref.java @@ -26,8 +26,6 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java index 22a36f5..7eeed7a 100644 --- a/java/test/TestH5S.java +++ b/java/test/TestH5S.java @@ -20,7 +20,6 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index e4d052e..548ac95 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -17,7 +17,6 @@ import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index de30b63..ed4e2a9 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -23,8 +23,6 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; - import org.junit.After; import org.junit.Before; import org.junit.Rule; diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java index 082a66e..7aac2ab 100644 --- a/java/test/TestH5Tbasic.java +++ b/java/test/TestH5Tbasic.java @@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java index a19698d..92a034c 100644 --- a/java/test/TestH5Tparams.java +++ b/java/test/TestH5Tparams.java @@ -15,7 +15,6 @@ package test; import static org.junit.Assert.assertTrue; import hdf.hdf5lib.H5; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/TestH5VL.java b/java/test/TestH5VL.java index c1766ff..49f0788 100644 --- a/java/test/TestH5VL.java +++ b/java/test/TestH5VL.java @@ -19,7 +19,6 @@ import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import java.io.File; @@ -172,7 +171,7 @@ public class TestH5VL { @Test(expected = HDF5LibraryException.class) public void testH5VLfapl_is_native() throws Throwable { - H5TestUtils.H5VLfapl_is_native(-1); + H5.H5VLfapl_is_native(-1); } } diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java index 53e57de..fde8f1a 100644 --- a/java/test/TestH5Z.java +++ b/java/test/TestH5Z.java @@ -17,7 +17,6 @@ import static org.junit.Assert.fail; import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5LibraryException; -import test.H5TestUtils; import org.junit.After; import org.junit.Before; diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index f2bb871..39db296 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -62,7 +62,6 @@ test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR LIST_LIBRARY_FILES=" $top_builddir/src/.libs/libhdf5.* $top_builddir/java/src/jni/.libs/libhdf5_java.* -$top_builddir/java/src/jni/.libs/libhdf5_java_test.* " LIST_JAR_TESTFILES=" $HDFLIB_HOME/hamcrest-core.jar @@ -151,21 +150,13 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done - - # Patch rpath for MacOS (Darwin) builds if [ "$IS_DARWIN" = "yes" ]; then (cd testlibs; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ - install_name_tool -add_rpath @loader_path libhdf5_java_test.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ -# echo "exist_path=" $exist_path; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib; \ - install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java_test.dylib; \ - exist_path2=` otool -l libhdf5_java_test.dylib | grep libhdf5_java | grep -v java_test | awk '{print $2}'`; \ -# echo "exist_path2=" $exist_path2; \ - install_name_tool -change $exist_path2 @rpath/libhdf5_java.dylib libhdf5_java_test.dylib) + echo $exist_path; \ + install_name_tool -change $exist_path @rpath/libhdf5.dylib libhdf5_java.dylib) fi - # copy jar files. Used -f to make sure get a new copy for tstfile in $COPY_JARTESTFILES do |