summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-08-07 04:59:31 (GMT)
committerGitHub <noreply@github.com>2022-08-07 04:59:31 (GMT)
commit956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch)
tree262418febb0a037f752e577ab632accd358edd93 /fortran
parent7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff)
downloadhdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2
Develop cmake clean (#1971)
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeTests.cmake13
-rw-r--r--fortran/test/CMakeTests.cmake28
-rw-r--r--fortran/test/tH5P_F03.F904
3 files changed, 40 insertions, 5 deletions
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index e59d6f8..d43a0f7 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -40,7 +40,18 @@ if (HDF5_TEST_SERIAL)
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
)
- set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
+ set_tests_properties (f90_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+ add_test (
+ NAME f90_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
+ )
+ set_tests_properties (f90_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 0588416..8c4d897 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -27,11 +27,12 @@ set (testhdf5_fortran_CLEANFILES
extern_2a.raw
extern_3a.raw
extern_4a.raw
- extren_raw.raw
+ extern_raw.h5
get_info.h5
nbit.h5
t_array_F03.h5
t_bit_F03.h5
+ t_controlchar.h5
t_controlchar_F03.h5
t_enum_F03.h5
t_objref_F03.h5
@@ -39,6 +40,7 @@ set (testhdf5_fortran_CLEANFILES
t_regref_F03.h5
t_string_F03.h5
t_vlen_F03.h5
+ t_vlstring.h5
t_vlstring_F03.h5
t_vlstringrw_F03.h5
tarray1.h5
@@ -50,6 +52,7 @@ set (testhdf5_fortran_CLEANFILES
titerate.h5
vds.h5
visit.h5
+ voltest.h5
)
# Remove any output file left over from previous test run
@@ -57,7 +60,18 @@ add_test (
NAME FORTRAN_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
)
-set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES FIXTURES_SETUP clear_testhdf5_fortran)
+set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_testhdf5_fortran
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME FORTRAN_testhdf5-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${testhdf5_fortran_CLEANFILES}
+)
+set_tests_properties (FORTRAN_testhdf5-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_testhdf5_fortran
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
@@ -147,6 +161,9 @@ else ()
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+set_tests_properties (FORTRAN_vol_connector PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for fflush1
add_test (
@@ -169,3 +186,10 @@ add_test (
set_tests_properties (FORTRAN_fflush2 PROPERTIES
DEPENDS FORTRAN_fflush1
)
+add_test (
+ NAME FORTRAN_flush1-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove flush.h5
+)
+set_tests_properties (FORTRAN_flush1-clean-objects PROPERTIES
+ DEPENDS FORTRAN_fflush2
+)
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index 43dd1c0..acd5a6a 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -567,7 +567,7 @@ SUBROUTINE external_test_offset(cleanup,total_error)
!
! Create the file and an initial group.
CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL h5fcreate_f('extren_raw.h5', H5F_ACC_TRUNC_F, file, error, access_prp=fapl)
+ CALL h5fcreate_f('extern_raw.h5', H5F_ACC_TRUNC_F, file, error, access_prp=fapl)
CALL check("h5fcreate_f",error,total_error)
CALL h5gcreate_f(file, "emit-diagnostics", grp, error)
@@ -646,7 +646,7 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
ENDDO
- IF(cleanup) CALL h5_cleanup_f("extren_raw.h5", H5P_DEFAULT_F, error)
+ IF(cleanup) CALL h5_cleanup_f("extern_raw.h5", H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE external_test_offset