summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
commit78ea0a0c081a1cf07795fffa2100057538510f81 (patch)
treede3d8d848badde9bb35d937b0c42912f3a62ae5f /hl/test
parentb7acf7dd3b44c9263476c884f57e6c0edb811c49 (diff)
downloadhdf5-78ea0a0c081a1cf07795fffa2100057538510f81.zip
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.gz
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.bz2
HDFFV-9875 Bring changes from develop branch
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/CMakeLists.txt16
-rw-r--r--hl/test/CMakeTests.cmake19
2 files changed, 24 insertions, 11 deletions
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index f07608c..a9f54ec 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -14,8 +14,8 @@ PROJECT (HDF5_HL_TEST)
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
+include_directories (${CMAKE_CURRENT_BINARY_DIR})
+include_directories (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Macro used to add a unit test
@@ -30,7 +30,7 @@ MACRO (HL_ADD_EXE hl_name)
${HDF5_TEST_LIB_TARGET}
)
set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
-ENDMACRO (HL_ADD_EXE)
+ENDMACRO ()
MACRO (HL_ADD_SHEXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
@@ -38,11 +38,11 @@ MACRO (HL_ADD_SHEXE hl_name)
TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
${HDF5_TEST_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
)
set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
-ENDMACRO (HL_ADD_SHEXE)
+ENDMACRO ()
HL_ADD_EXE (test_ds)
HL_ADD_EXE (test_dset_opt)
@@ -56,8 +56,8 @@ TARGET_NAMING (hl_test_packet STATIC)
TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ")
target_link_libraries (hl_test_packet
${HDF5_HL_LIB_TARGET}
- ${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
)
set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
@@ -71,10 +71,10 @@ if (HDF5_BUILD_GENERATORS)
TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ")
target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
- ${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
)
set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
-endif (HDF5_BUILD_GENERATORS)
+endif ()
include (CMakeTests.cmake)
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index 619e991..e8b7079 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -35,14 +35,27 @@ add_custom_target(hl_test_files ALL COMMENT "Copying files needed by hl_test tes
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_TEST hl_name)
- add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME HL_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ else ()
+ add_test (NAME HL_${hl_name} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:hl_${hl_name}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=hl_${hl_name}.txt"
+ #-D "TEST_REFERENCE=hl_${hl_name}.out"
+ -D "TEST_FOLDER=${HDF5_HL_TEST_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test}
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
)
endif ()
-ENDMACRO (HL_ADD_TEST)
+ENDMACRO ()
# Remove any output file left over from previous test run
add_test (
@@ -76,7 +89,7 @@ add_test (
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_test-clear-objects PROPERTIES DEPENDS ${last_test})
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
set (last_test "HL_test-clear-objects")
HL_add_test (test_ds)