summaryrefslogtreecommitdiffstats
path: root/tools/test/misc/CMakeTestsMkgrp.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:24:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:24:56 (GMT)
commit6a932198aa9c3da1d23fe4c4bdee05891bc2e38b (patch)
tree029e075420a7c148366ba038a5f76662c0cb63b4 /tools/test/misc/CMakeTestsMkgrp.cmake
parentd3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (diff)
downloadhdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.zip
hdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.tar.gz
hdf5-6a932198aa9c3da1d23fe4c4bdee05891bc2e38b.tar.bz2
HDFFV-10529 Update CMake tests to use test fixtures
Diffstat (limited to 'tools/test/misc/CMakeTestsMkgrp.cmake')
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake108
1 files changed, 35 insertions, 73 deletions
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 37d87ca..11fa3f2 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -61,29 +61,22 @@
endif ()
macro (ADD_H5_TEST resultfile resultcode resultoption)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- add_test (
- NAME H5MKGRP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
- )
- set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- endif ()
-
+ add_test (
+ NAME H5MKGRP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
add_test (
NAME H5MKGRP-${resultfile}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES
+ DEPENDS H5MKGRP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
@@ -107,13 +100,11 @@
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
+ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
- set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
add_test (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -126,7 +117,9 @@
-D "TEST_REFERENCE=${resultfile}.txt"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
+ set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES
+ DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects
+ )
endif ()
endmacro ()
@@ -138,54 +131,23 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5mkgrp_help.out
- h5mkgrp_help.out.err
- h5mkgrp_version.out
- h5mkgrp_version.out.err
- h5mkgrp_single.h5
- h5mkgrp_single.out
- h5mkgrp_single.out.err
- h5mkgrp_single_v.h5
- h5mkgrp_single_v.out
- h5mkgrp_single_v.out.err
- h5mkgrp_single_p.h5
- h5mkgrp_single_p.out
- h5mkgrp_single_p.out.err
- h5mkgrp_single_l.h5
- h5mkgrp_single_l.out
- h5mkgrp_single_l.out.err
- h5mkgrp_several.h5
- h5mkgrp_several.out
- h5mkgrp_several.out.err
- h5mkgrp_several_v.h5
- h5mkgrp_several_v.out
- h5mkgrp_several_v.out.err
- h5mkgrp_several_p.h5
- h5mkgrp_several_p.out
- h5mkgrp_several_p.out.err
- h5mkgrp_several_l.h5
- h5mkgrp_several_l.out
- h5mkgrp_several_l.out.err
- h5mkgrp_nested_p.h5
- h5mkgrp_nested_p.out
- h5mkgrp_nested_p.out.err
- h5mkgrp_nested_lp.h5
- h5mkgrp_nested_lp.out
- h5mkgrp_nested_lp.out.err
- h5mkgrp_nested_mult_p.h5
- h5mkgrp_nested_mult_p.out
- h5mkgrp_nested_mult_p.out.err
- h5mkgrp_nested_mult_lp.h5
- h5mkgrp_nested_mult_lp.out
- h5mkgrp_nested_mult_lp.out.err
+ COMMAND ${CMAKE_COMMAND} -E remove
+ h5mkgrp_single.h5
+ h5mkgrp_single_v.h5
+ h5mkgrp_single_p.h5
+ h5mkgrp_single_l.h5
+ h5mkgrp_several.h5
+ h5mkgrp_several_v.h5
+ h5mkgrp_several_p.h5
+ h5mkgrp_several_l.h5
+ h5mkgrp_nested_p.h5
+ h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_lp.h5
+ )
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
- set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (last_test)
- set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5MKGRP-clearall-objects")
endif ()
# Check that help & version is displayed properly