diff options
Diffstat (limited to 'tools/test/h5format_convert')
-rw-r--r-- | tools/test/h5format_convert/CMakeTests.cmake | 76 |
1 files changed, 29 insertions, 47 deletions
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 5792d40..5599c1b 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -108,10 +108,10 @@ ./testfiles/${testname}.out ./testfiles/${testname}.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () - if (NOT "${testfile}" STREQUAL "") + if (${testfile}) add_test ( NAME H5FC-${testname}-${testfile}-tmpfile COMMAND ${CMAKE_COMMAND} @@ -161,7 +161,7 @@ ./testfiles/${testname}.out ./testfiles/${testname}.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( @@ -197,48 +197,30 @@ ./testfiles/${testname}.out ./testfiles/${testname}.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () - if (NOT "${testfile}" STREQUAL "") - add_test ( - NAME H5FC-${testname}-${testfile}-tmpfile - COMMAND ${CMAKE_COMMAND} - -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 - ) - set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") - add_test ( - NAME H5FC-${testname}-${testfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>" - -D "TEST_ARGS=${ARGN};outtmp.h5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}" - -D "TEST_ERRREF=${resultfile}.err" - -D "TEST_MASK_ERROR=true" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") - set (last_test "H5FC-${testname}-${testfile}") - else () - add_test ( - NAME H5FC-${testname}-NA - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>" - -D "TEST_ARGS=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}" - -D "TEST_ERRREF=${resultfile}.err" - -D "TEST_MASK_ERROR=true" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") - set (last_test "H5FC-${testname}-NA") - endif () + add_test ( + NAME H5FC-${testname}-${testfile}-tmpfile + COMMAND ${CMAKE_COMMAND} + -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") + add_test ( + NAME H5FC-${testname}-${testfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>" + -D "TEST_ARGS=${ARGN};outtmp.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testname}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}" + -D "TEST_ERRREF=${resultfile}.err" + -D "TEST_MASK_ERROR=true" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") + set (last_test "H5FC-${testname}-${testfile}") endif () endmacro () @@ -253,7 +235,7 @@ ./testfiles/${testname}.out ./testfiles/${testname}.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( @@ -300,7 +282,7 @@ ./testfiles/${testname}.out ./testfiles/${testname}.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( @@ -343,7 +325,7 @@ ./testfiles/${testname}_chk.out ./testfiles/${testname}_chk.out.err ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () add_test ( @@ -449,7 +431,7 @@ chktmp.h5 dmptmp.h5 ) - if (NOT "${last_test}" STREQUAL "") + if (last_test) set_tests_properties (H5FC-clearall-objects PROPERTIES DEPENDS ${last_test}) endif () set (last_test "H5FC-clearall-objects") |