summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake58
1 files changed, 22 insertions, 36 deletions
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index 83386de..2242692 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -64,21 +64,9 @@ endforeach ()
##############################################################################
##############################################################################
- MACRO (ADD_H5_TEST resultfile resultcode)
+ macro (ADD_H5_TEST resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5WATCH_ARGS-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.out
- ${resultfile}.out.err
- )
- set_tests_properties (H5WATCH_ARGS-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5WATCH_ARGS-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5WATCH_ARGS-${resultfile}-clearall-objects")
- add_test (
NAME H5WATCH_ARGS-h5watch-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
@@ -89,20 +77,18 @@ endforeach ()
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS H5WATCH_ARGS-${resultfile}-clear-objects)
- set (last_test "H5WATCH_ARGS-${resultfile}")
+ set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS ${last_test})
+ set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
endif ()
- ENDMACRO ()
+ endmacro ()
- MACRO (ADD_H5_WATCH resultfile resultcode)
+ macro (ADD_H5_WATCH resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5WATCH-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
)
set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
add_test (
@@ -118,7 +104,7 @@ endforeach ()
)
set_tests_properties (H5WATCH-${resultfile} PROPERTIES DEPENDS H5WATCH-${resultfile}-clear-objects)
endif ()
- ENDMACRO ()
+ endmacro ()
##############################################################################
##############################################################################
@@ -130,7 +116,7 @@ endforeach ()
# supports SWMR.
set (SWMR_INCOMPAT ${hl_swmr_check_compat_vfd})
-IF (NOT SWMR_INCOMPAT)
+if (NOT SWMR_INCOMPAT)
# Remove any output file left over from previous test run
add_test (
NAME H5WATCH-clearall-objects
@@ -169,23 +155,23 @@ IF (NOT SWMR_INCOMPAT)
set (last_test "H5WATCH-h5watchgentest")
# Test on --help options
- ADD_H5_TEST(w-help1 0 --help)
+ ADD_H5_TEST (w-help1 0 --help)
#
# Tests on expected failures
- ADD_H5_TEST(w-err-dset1 1 WATCH.h5)
- ADD_H5_TEST(w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
- ADD_H5_TEST(w-err-dset-none 1 WATCH.h5/DSET_NONE)
- ADD_H5_TEST(w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
- ADD_H5_TEST(w-err-file 1 ../WATCH.h5/DSET_CMPD)
- ADD_H5_TEST(w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
- ADD_H5_TEST(w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
- ADD_H5_TEST(w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
+ ADD_H5_TEST (w-err-dset1 1 WATCH.h5)
+ ADD_H5_TEST (w-err-dset2 1 WATCH.h5/group/DSET_CMPD)
+ ADD_H5_TEST (w-err-dset-none 1 WATCH.h5/DSET_NONE)
+ ADD_H5_TEST (w-err-dset-nomax 1 WATCH.h5/DSET_NOMAX)
+ ADD_H5_TEST (w-err-file 1 ../WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-width 1 --width=-8 WATCH.h5/DSET_ONE)
+ ADD_H5_TEST (w-err-poll 1 --polling=-8 WATCH.h5/DSET_ONE)
+ ADD_H5_TEST (w-err-poll0 1 --polling=0 WATCH.h5/DSET_ONE)
#
# Tests on invalid field names via --fields option for a compound typed dataset: DSET_CMPD
- ADD_H5_TEST(w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
- ADD_H5_TEST(w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
- ADD_H5_TEST(w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
- ADD_H5_TEST(w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
- ADD_H5_TEST(w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd1 1 --fields=fieldx WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd2 1 --fields=field1,field2. WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd3 1 --fields=field1,field2, WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd4 1 --fields=field1,field2.b.k WATCH.h5/DSET_CMPD)
+ ADD_H5_TEST (w-err-cmpd5 1 --fields=field1 --fields=field2.b.k WATCH.h5/DSET_CMPD)
#
-ENDIF ()
+endif ()