summaryrefslogtreecommitdiffstats
path: root/hl/c++/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 /hl/c++/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 'hl/c++/test')
-rw-r--r--hl/c++/test/CMakeLists.txt2
-rw-r--r--hl/c++/test/CMakeTests.cmake20
2 files changed, 19 insertions, 3 deletions
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 9a1d6fd..fb750dd 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -3,7 +3,7 @@ project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
target_compile_options(hl_ptableTest PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
-target_include_directories (hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_include_directories (hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (hl_ptableTest STATIC)
target_link_libraries (hl_ptableTest PRIVATE
diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
index 5abbd47..4137270 100644
--- a/hl/c++/test/CMakeTests.cmake
+++ b/hl/c++/test/CMakeTests.cmake
@@ -15,12 +15,19 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+# Remove any output file left over from previous test run
+set (HL_CPP_PT_CLEANFILES
+ packettest.h5
+)
add_test (
NAME HL_CPP_ptableTest-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${example}.txt
+ -E remove ${HL_CPP_PT_CLEANFILES}
)
+set_tests_properties (HL_CPP_ptableTest-clear-objects PROPERTIES
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME HL_CPP_ptableTest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ptableTest>)
else ()
@@ -37,3 +44,12 @@ else ()
)
endif ()
set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects)
+add_test (
+ NAME HL_CPP_ptableTest-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_CPP_PT_CLEANFILES}
+)
+set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES
+ DEPENDS HL_CPP_ptableTest
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)