summaryrefslogtreecommitdiffstats
path: root/testpar
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 /testpar
parent89b4afd4b317c5131cbc8607c99d21b369d050eb (diff)
downloadhdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt12
-rw-r--r--testpar/CMakeTests.cmake12
-rw-r--r--testpar/CMakeVFDTests.cmake46
3 files changed, 49 insertions, 21 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index eb5b8cd..0683338 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -23,8 +23,12 @@ set (testphdf5_SOURCES
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
target_compile_options(testphdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+target_compile_definitions(testphdf5
+ PRIVATE
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
+)
target_include_directories (testphdf5
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (testphdf5 STATIC)
@@ -49,8 +53,12 @@ endif ()
macro (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${file}
+ PRIVATE
+ "$<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>"
+ )
target_include_directories (${file}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${file} STATIC)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index ee69881..1a3f409 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -22,6 +22,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
set_tests_properties (MPI_TEST-clear-testphdf5-objects PROPERTIES FIXTURES_SETUP par_clear_testphdf5)
+add_test (
+ NAME MPI_TEST-clean-testphdf5-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ParaTest.h5
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
+)
+set_tests_properties (MPI_TEST-clean-testphdf5-objects PROPERTIES FIXTURES_CLEANUP par_clear_testphdf5)
set (SKIP_tests
cchunk1
@@ -101,6 +107,12 @@ add_test (
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
set_tests_properties (MPI_TEST-clear-objects PROPERTIES FIXTURES_SETUP par_clear_objects)
+add_test (
+ NAME MPI_TEST-clean-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_par_CLEANFILES}
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
+)
+set_tests_properties (MPI_TEST-clean-objects PROPERTIES FIXTURES_CLEANUP par_clear_objects)
foreach (h5_testp ${H5P_TESTS})
add_test (NAME MPI_TEST_${h5_testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${h5_testp}> ${MPIEXEC_POSTFLAGS})
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index d6a4025..40624d5 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -25,26 +25,34 @@ set (H5P_VFD_TESTS
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
foreach (h5_test ${H5P_VFD_TESTS})
- add_test (
- NAME MPI_TEST_VFD-${vfdname}-${h5_test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${h5_test}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
- )
+ if (NOT "${h5_test}" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ add_test (
+ NAME MPI_TEST_VFD-${vfdname}-${h5_test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${h5_test}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
+ )
+ endif ()
endforeach ()
- set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true")
- #set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
- set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1)
+ if (NOT "t_pflush1" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush1 PROPERTIES WILL_FAIL "true")
+ #set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
+ endif ()
+ if (NOT "t_pflush2" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ if (NOT "t_pflush1" IN_LIST H5P_VFD_${vfdname}_TESTS_SKIP)
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-t_pflush2 PROPERTIES DEPENDS MPI_TEST_VFD-${vfdname}-t_pflush1)
+ endif ()
+ endif ()
endif ()
endmacro ()