summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-02-07 06:14:12 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-02-07 06:14:12 (GMT)
commit7590687d4beb3d851a97df7ed163d6ca8fa582fe (patch)
tree825bb36c3b9cf6c3afdbc1fd76250b05da585603 /test
parenta7def93aa3d5d2a87b4247fa27ee5a247496feec (diff)
parent06d1971f415a9eeb1ab995a3276f7f13508dde02 (diff)
downloadhdf5-7590687d4beb3d851a97df7ed163d6ca8fa582fe.zip
hdf5-7590687d4beb3d851a97df7ed163d6ca8fa582fe.tar.gz
hdf5-7590687d4beb3d851a97df7ed163d6ca8fa582fe.tar.bz2
[svn-r26143] Merged r26096-26142 from trunk.
Tested on: jam w/ Fortran and C++
Diffstat (limited to 'test')
-rw-r--r--test/CMakeTests.cmake89
1 files changed, 77 insertions, 12 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 1e497ae..f609b7a 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -605,23 +605,88 @@ if (HDF5_TEST_VFD)
set (H5_VFD_TESTS ${H5_VFD_TESTS} big)
endif (NOT CYGWIN)
- MACRO (ADD_VFD_TEST vfdname resultcode)
- foreach (test ${H5_VFD_TESTS})
+ MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode)
+ if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
+ if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
+ if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
+ )
+ endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
+ else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
+ else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
add_test (
- NAME VFD-${vfdname}-${test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${test}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- set_tests_properties (VFD-${vfdname}-${test} PROPERTIES
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
+ ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode)
+
+ MACRO (ADD_VFD_TEST vfdname resultcode)
+ foreach (test ${H5_VFD_TESTS})
+ if (WIN32)
+ CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
+ else (WIN32)
+ add_test (
+ NAME VFD-${vfdname}-${test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${test}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${test} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ endif (WIN32)
endforeach (test ${H5_VFD_TESTS})
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)