diff options
Diffstat (limited to 'test/CMakeTests.cmake')
-rw-r--r-- | test/CMakeTests.cmake | 98 |
1 files changed, 85 insertions, 13 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index dd6ff89..be3b52f 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -281,6 +281,16 @@ if (HDF5_ENABLE_USING_MEMCHECKER) ) else () add_test (NAME H5TEST-testhdf5 COMMAND $<TARGET_FILE:testhdf5>) + add_test (NAME H5TEST-testhdf5 COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=testhdf5.txt" + #-D "TEST_REFERENCE=testhdf5.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) set_tests_properties (H5TEST-testhdf5 PROPERTIES DEPENDS H5TEST-clear-testhdf5-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" @@ -310,7 +320,16 @@ else () WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - add_test (NAME H5TEST-shared-testhdf5 COMMAND $<TARGET_FILE:testhdf5-shared>) + add_test (NAME H5TEST-shared-testhdf5 COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:testhdf5-shared>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=testhdf5.txt" + #-D "TEST_REFERENCE=testhdf5.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES DEPENDS H5TEST-shared-clear-testhdf5-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" @@ -595,18 +614,36 @@ set (H5TEST_TESTS ) foreach (test ${H5TEST_TESTS}) - if (${test} STREQUAL "big" AND CYGWIN) - add_test (NAME H5TEST-${test} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>) + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) else () - add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>) + if (${test} STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + ) + else () + add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${test}>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) endif () - set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) endforeach () set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1) @@ -631,7 +668,16 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" ) else () - add_test (NAME H5TEST-shared-${test} COMMAND $<TARGET_FILE:${test}-shared>) + add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) endif () set_tests_properties (H5TEST-shared-${test} PROPERTIES DEPENDS H5TEST-shared-clear-objects @@ -662,7 +708,20 @@ if (NOT CYGWIN) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) - add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>) + else () + add_test (NAME H5TEST-cache COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:cache>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=cache.txt" + #-D "TEST_REFERENCE=cache.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" @@ -769,7 +828,20 @@ if (BUILD_SHARED_LIBS) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>) + else () + add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:cache-shared>" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=cache-shared.txt" + #-D "TEST_REFERENCE=cache-shared.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () set_tests_properties (H5TEST-shared-cache PROPERTIES DEPENDS H5TEST-shared-clear-cache-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" |