summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-11 20:02:34 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-11 20:02:34 (GMT)
commit244faaa0d048e7e06fb5aec8d4f661f1893c3030 (patch)
tree50d18b730a41e3f644f4d2729ea30ebe387bdfba /hl/test
parente1bcae8a6a804490aa941a654e99b1dd18251411 (diff)
downloadhdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.zip
hdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.tar.gz
hdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.tar.bz2
HDFFV-10094: upgrade cmake command conventions
Also converted tests to use macros
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/CMakeTests.cmake15
1 files changed, 14 insertions, 1 deletions
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index f8312a1..c5b051f 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -36,7 +36,20 @@ 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}"