summaryrefslogtreecommitdiffstats
path: root/examples/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'examples/CMakeTests.cmake')
-rw-r--r--examples/CMakeTests.cmake92
1 files changed, 72 insertions, 20 deletions
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index 4a4728e..3412b22 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -8,19 +8,19 @@
if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5EX-shared")
file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared/red ${PROJECT_BINARY_DIR}/H5EX-shared/blue ${PROJECT_BINARY_DIR}/H5EX-shared/u2w)
- endif (BUILD_SHARED_LIBS)
+ endif ()
# Remove any output file left over from previous test run
add_test (
NAME EXAMPLES-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
Attributes.h5
btrees_file.h5
cmprss.h5
default_file.h5
dset.h5
- extend.h5
+ extend.h5
extlink_prefix_source.h5
extlink_source.h5
extlink_target.h5
@@ -62,29 +62,42 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-clear-objects")
foreach (example ${examples})
- add_test (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ else ()
+ add_test (NAME EXAMPLES-${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${example}.txt"
+ #-D "TEST_REFERENCE=${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-${example}")
- endforeach (example ${examples})
+ endforeach ()
if (BUILD_SHARED_LIBS)
# Remove any output file left over from previous test run
add_test (
NAME EXAMPLES-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
Attributes.h5
btrees_file.h5
cmprss.h5
default_file.h5
dset.h5
- extend.h5
+ extend.h5
extlink_prefix_source.h5
extlink_source.h5
extlink_target.h5
@@ -128,32 +141,71 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-shared-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-shared-clear-objects")
foreach (example ${examples})
- add_test (NAME EXAMPLES-shared-${example} COMMAND $<TARGET_FILE:${example}-shared>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-shared-${example} COMMAND $<TARGET_FILE:${example}-shared>)
+ else ()
+ add_test (NAME EXAMPLES-shared-${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${example}.txt"
+ #-D "TEST_REFERENCE=${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5EX-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
set_tests_properties (EXAMPLES-shared-${example} PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-shared-${example} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-shared-${example}")
- endforeach (example ${examples})
- endif (BUILD_SHARED_LIBS)
+ endforeach ()
+ endif ()
### Windows pops up a modal permission dialog on this test
if (H5_HAVE_PARALLEL AND NOT WIN32)
- add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ else ()
+ add_test (NAME EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:ph5example>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=ph5example.txt"
+ #-D "TEST_REFERENCE=ph5example.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-ph5example")
if (BUILD_SHARED_LIBS)
- add_test (NAME EXAMPLES-shared-ph5example COMMAND $<TARGET_FILE:ph5example-shared>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME EXAMPLES-shared-ph5example COMMAND $<TARGET_FILE:ph5example-shared>)
+ else ()
+ add_test (NAME EXAMPLES-shared-ph5example COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:ph5example-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=ph5example-shared.txt"
+ #-D "TEST_REFERENCE=ph5example-shared.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5EX-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "EXAMPLES-shared-ph5example")
- endif (BUILD_SHARED_LIBS)
- endif (H5_HAVE_PARALLEL AND NOT WIN32)
+ endif ()
+ endif ()