summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-08-21 22:13:03 (GMT)
committerGitHub <noreply@github.com>2023-08-21 22:13:03 (GMT)
commitceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch)
tree887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /fortran/test
parent89b4afd4b317c5131cbc8607c99d21b369d050eb (diff)
downloadhdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt4
-rw-r--r--fortran/test/CMakeTests.cmake23
2 files changed, 24 insertions, 3 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 2d29497..bfad283 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -45,7 +45,7 @@ if (NOT BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -62,7 +62,7 @@ if (NOT BUILD_SHARED_LIBS)
else ()
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h)
target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_options(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 68d8a5a..93571e1 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -57,7 +57,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 +158,9 @@ else ()
-P "${HDF_RESOURCES_DIR}/runTest.cmake"
)
endif ()
+set_tests_properties (FORTRAN_vol_connector PROPERTIES
+ FIXTURES_REQUIRED clear_testhdf5_fortran
+)
#-- Adding test for fflush1
add_test (
@@ -169,3 +183,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
+)