mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
Merge pull request #1733 in HDFFV/hdf5 from ~BRTNFLD/hdf5_msb:develop to develop
* commit 'd754a86c2412747be587633fb7e7180570b3f82a': updated static vol_connector build updated static vol_connector build fixed dependencies fixed invalid pointer removed unregistering native vol fix for cycle dependency
This commit is contained in:
commit
054059a30c
@ -232,7 +232,8 @@ CONTAINS
|
||||
|
||||
hdferr = 0
|
||||
IF(PRESENT(name_len))THEN
|
||||
name_len = INT(H5VLget_connector_name(obj_id, c_name, 0_SIZE_T), SIZE_T)
|
||||
c_name(1:1)(1:1) = C_NULL_CHAR
|
||||
name_len = INT(H5VLget_connector_name(obj_id, c_name, 1_SIZE_T), SIZE_T)
|
||||
IF(name_len.LT.0) hdferr = H5I_INVALID_HID_F
|
||||
ELSE
|
||||
l = INT(LEN(name)+1,SIZE_T)
|
||||
|
@ -570,7 +570,11 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
add_executable (vol_connector vol_connector.F90)
|
||||
add_executable (vol_connector
|
||||
vol_connector.F90
|
||||
tH5L_F03.F90
|
||||
tHDF5_F03.F90)
|
||||
|
||||
target_include_directories (vol_connector
|
||||
PRIVATE
|
||||
${CMAKE_Fortran_MODULE_DIRECTORY}/static
|
||||
@ -600,7 +604,10 @@ set_target_properties (vol_connector PROPERTIES
|
||||
add_dependencies (vol_connector ${HDF5_F90_TEST_LIB_TARGET})
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_executable (vol_connector-shared vol_connector.F90)
|
||||
add_executable (vol_connector-shared
|
||||
vol_connector.F90
|
||||
tH5L_F03.F90
|
||||
tHDF5_F03.F90)
|
||||
target_include_directories (vol_connector-shared
|
||||
PRIVATE
|
||||
${CMAKE_Fortran_MODULE_DIRECTORY}/shared
|
||||
|
@ -131,8 +131,24 @@ add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
|
||||
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
add_test (NAME FORTRAN_vol_connector COMMAND $<TARGET_FILE:vol_connector>)
|
||||
set_tests_properties (FORTRAN_vol_connector PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME FORTRAN_vol_connector COMMAND $<TARGET_FILE:vol_connector>)
|
||||
else ()
|
||||
add_test (NAME FORTRAN_vol_connector COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:vol_connector>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_EXPECT=0"
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-D "TEST_REGEX= 0 error.s."
|
||||
-D "TEST_MATCH= 0 error(s)"
|
||||
-D "TEST_OUTPUT=vol_connector.txt"
|
||||
#-D "TEST_REFERENCE=vol_connector.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
endif ()
|
||||
# set_tests_properties (FORTRAN_vol_connector PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_vol_connector PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
@ -216,6 +232,7 @@ if (BUILD_SHARED_LIBS)
|
||||
# set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_testhdf5_fortran_1_8-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran_1_8)
|
||||
|
||||
|
||||
#-- Adding test for fortranlib_test_F03
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME FORTRAN_fortranlib_test_F03-shared COMMAND $<TARGET_FILE:fortranlib_test_F03-shared>)
|
||||
@ -236,6 +253,26 @@ if (BUILD_SHARED_LIBS)
|
||||
# set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_fortranlib_test_F03-shared PROPERTIES DEPENDS FORTRAN_fortranlib_test_F03)
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME FORTRAN_vol_connector-shared COMMAND $<TARGET_FILE:vol_connector-shared>)
|
||||
else ()
|
||||
add_test (NAME FORTRAN_vol_connector-shared COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:vol_connector-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_EXPECT=0"
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-D "TEST_REGEX= 0 error.s."
|
||||
-D "TEST_MATCH= 0 error(s)"
|
||||
-D "TEST_OUTPUT=vol_connector.txt"
|
||||
#-D "TEST_REFERENCE=vol_connector.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/fshared"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
endif ()
|
||||
# set_tests_properties (FORTRAN_vol_connector-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
|
||||
set_tests_properties (FORTRAN_vol_connector-shared PROPERTIES DEPENDS FORTRAN_vol_connector)
|
||||
|
||||
#-- Adding test for fflush1
|
||||
add_test (NAME FORTRAN_fflush1-shared COMMAND $<TARGET_FILE:fflush1-shared>)
|
||||
set_tests_properties (FORTRAN_fflush1-shared PROPERTIES DEPENDS FORTRAN_fflush2)
|
||||
@ -244,7 +281,4 @@ if (BUILD_SHARED_LIBS)
|
||||
add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
|
||||
set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
|
||||
|
||||
#-- Adding test for vol_connector
|
||||
add_test (NAME FORTRAN_vol_connector-shared COMMAND $<TARGET_FILE:vol_connector-shared>)
|
||||
set_tests_properties (FORTRAN_vol_connector-shared PROPERTIES DEPENDS FORTRAN_vol_connector-shared)
|
||||
endif ()
|
||||
|
@ -55,9 +55,10 @@ CONTAINS
|
||||
LOGICAL :: is_registered = .FALSE.
|
||||
INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1
|
||||
CHARACTER(LEN=64) :: name
|
||||
CHARACTER(LEN=1) :: name_null
|
||||
CHARACTER(LEN=6) :: name_exact
|
||||
INTEGER(SIZE_T) :: name_len
|
||||
INTEGER(hid_t) :: file_id
|
||||
INTEGER :: cmp = -1
|
||||
|
||||
! The null VOL connector should not be registered at the start of the test
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
@ -87,16 +88,28 @@ CONTAINS
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name, NATIVE_VOL_CONNECTOR_NAME, total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_null, error, name_len)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_null, error)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name_null, NATIVE_VOL_CONNECTOR_NAME(1:1), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_exact, error, name_len)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", INT(name_len), LEN_TRIM(NATIVE_VOL_CONNECTOR_NAME), total_error)
|
||||
|
||||
CALL H5VLget_connector_name_f(file_id, name_exact, error)
|
||||
CALL check("H5VLget_connector_name_f",error,total_error)
|
||||
CALL VERIFY("H5VLget_connector_name_f", name_exact, NATIVE_VOL_CONNECTOR_NAME, total_error)
|
||||
|
||||
CALL H5Fclose_f(file_id, error)
|
||||
CALL check("H5Fclose_f",error,total_error)
|
||||
|
||||
CALL H5VLclose_f(vol_id_out, error)
|
||||
CALL check("H5VLclose_f",error, total_error)
|
||||
|
||||
! Unregister the connector
|
||||
CALL H5VLunregister_connector_f(vol_id, error)
|
||||
CALL check("H5VLunregister_connector_f", error, total_error)
|
||||
|
||||
END SUBROUTINE test_registration_by_name
|
||||
|
||||
!-------------------------------------------------------------------------
|
||||
@ -132,10 +145,6 @@ CONTAINS
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .TRUE., total_error)
|
||||
|
||||
! Unregister the connector
|
||||
CALL H5VLunregister_connector_f(vol_id, error)
|
||||
CALL check("H5VLunregister_connector_f", error, total_error)
|
||||
|
||||
END SUBROUTINE test_registration_by_value
|
||||
|
||||
|
||||
@ -157,19 +166,15 @@ CONTAINS
|
||||
|
||||
LOGICAL :: is_registered = .FALSE.
|
||||
INTEGER(hid_t) :: vol_id = 0, vol_id_out = 1
|
||||
CHARACTER(LEN=64) :: name
|
||||
INTEGER(SIZE_T) :: name_len
|
||||
INTEGER(hid_t) :: file_id
|
||||
INTEGER :: cmp = -1
|
||||
INTEGER(hid_t) :: fapl_id
|
||||
TYPE(C_PTR) :: f_ptr
|
||||
INTEGER(hid_t), TARGET :: under_fapl
|
||||
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
CALL VERIFY("H5VLis_connector_registered_f", is_registered, .FALSE., total_error)
|
||||
|
||||
|
||||
! The null VOL connector should not be registered at the start of the test
|
||||
CALL H5VLis_connector_registered_f( "FAKE_VOL_CONNECTOR_NAME", is_registered, error)
|
||||
CALL check("H5VLis_connector_registered_f",error,total_error)
|
||||
@ -216,10 +221,6 @@ CONTAINS
|
||||
CALL H5VLclose_f(vol_id, error)
|
||||
CALL check("H5VLclose_f",error, total_error)
|
||||
|
||||
! Unregister the connector
|
||||
CALL H5VLunregister_connector_f(vol_id, error)
|
||||
CALL check("H5VLunregister_connector_f", error, total_error)
|
||||
|
||||
CALL H5Fclose_f(file_id, error)
|
||||
CALL check("H5Fclose_f",error,total_error)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user