diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-08-21 22:13:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 22:13:03 (GMT) |
commit | ceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch) | |
tree | 887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /c++/test | |
parent | 89b4afd4b317c5131cbc8607c99d21b369d050eb (diff) | |
download | hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2 |
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'c++/test')
-rw-r--r-- | c++/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | c++/test/CMakeTests.cmake | 18 | ||||
-rw-r--r-- | c++/test/CMakeVFDTests.cmake | 14 |
3 files changed, 4 insertions, 30 deletions
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 331cada..3511c5f 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -38,7 +38,7 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ${HDF5_CPP_TEST_SOURCE_DIR}/h5cpputil.h) -target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") +target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") target_compile_options(cpp_testhdf5 PRIVATE "${HDF5_CMAKE_CXX_FLAGS}") target_compile_definitions(cpp_testhdf5 PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK>"# Parallel/MPI, prevent spurious cpp/cxx warnings diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake index e34f629..fc94a68 100644 --- a/c++/test/CMakeTests.cmake +++ b/c++/test/CMakeTests.cmake @@ -17,20 +17,6 @@ add_custom_target(cpp_testhdf5_files ALL COMMENT "Copying files needed by cpp_te ### T E S T I N G ### ############################################################################## ############################################################################## -# Remove any output file left over from previous test run -add_test ( - NAME CPP_testhdf5-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tattr_basic.h5 - tattr_compound.h5 - tattr_dtype.h5 - tattr_multi.h5 - tattr_scalar.h5 - tfattrs.h5 - titerate.h5 -) - if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME CPP_testhdf5 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:cpp_testhdf5>) else () @@ -46,7 +32,9 @@ else () -P "${HDF_RESOURCES_DIR}/runTest.cmake" ) endif () -set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects) +set_tests_properties (CPP_testhdf5 PROPERTIES + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) ############################################################################## ############################################################################## diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake index ced9b0c..5405df3 100644 --- a/c++/test/CMakeVFDTests.cmake +++ b/c++/test/CMakeVFDTests.cmake @@ -22,22 +22,9 @@ H5_CREATE_VFD_DIR() ### T H E T E S T S M A C R O S ### ############################################################################## ############################################################################## - macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove - tattr_basic.h5 - tattr_compound.h5 - tattr_dtype.h5 - tattr_multi.h5 - tattr_scalar.h5 - tfattrs.h5 - titerate.h5 - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname} - ) - add_test ( NAME CPP_VFD-${vfdname}-cpp_testhdf5 COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" @@ -49,7 +36,6 @@ macro (ADD_VFD_TEST vfdname resultcode) -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects) set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT}) endif () endmacro () |