mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-24 15:25:00 +08:00
TRILAB-111 fixes for parallel testing
This commit is contained in:
parent
50b85e0330
commit
b95f05638c
@ -45,9 +45,9 @@ set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=
|
||||
set (CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
|
||||
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
|
||||
|
||||
set (CTEST_TEST_TIMEOUT 600 CACHE STRING
|
||||
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test.")
|
||||
set (DART_TESTING_TIMEOUT 600 CACHE STRING
|
||||
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
|
||||
"Maximum time allowed before CTest will kill the test." FORCE)
|
||||
|
||||
SET(CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
|
||||
|
@ -38,6 +38,7 @@ set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
|
||||
set (${HDF5_PACKAGE_NAME}_BUILD_JAVA @HDF5_BUILD_JAVA@)
|
||||
set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
|
||||
set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
|
||||
set (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE @HDF5_ENABLE_THREADSAFE@)
|
||||
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
|
||||
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT @HDF5_ENABLE_SZIP_SUPPORT@)
|
||||
set (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF5_ENABLE_SZIP_ENCODING@)
|
||||
@ -45,6 +46,8 @@ set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
||||
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
|
||||
set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
|
||||
set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
|
||||
set (${HDF5_PACKAGE_NAME}_DEFAULT_API_VERSION "@DEFAULT_API_VERSION@")
|
||||
set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
|
@ -257,7 +257,7 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
|
||||
# On Cray XC40, configuring fails in the Fortran section when using the craype-mic-knl module.
|
||||
# When the configure phase is done with the craype-haswell module and the build phase is done
|
||||
# with the craype-mic-knl module, configure succeeds and tests pass on the knl compute nodes
|
||||
# for Intel, Cray, GCC and Clang compilers. If the variables aren't set or if not
|
||||
# for Intel, Cray, GCC and Clang compilers. If the variables aren't set or if not
|
||||
# cross compiling, the module switch will not occur.
|
||||
if (CMAKE_CROSSCOMPILING AND COMPILENODE_HWCOMPILE_MODULE AND COMPUTENODE_HWCOMPILE_MODULE)
|
||||
execute_process (COMMAND module switch ${COMPILENODE_HWCOMPILE_MODULE} ${COMPUTENODE_HWCOMPILE_MODULE})
|
||||
@ -277,11 +277,11 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
|
||||
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
|
||||
else ()
|
||||
file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$")
|
||||
if ("${LOCAL_BATCH_SCRIPT_COMMAND}" STREQUAL "raybsub")
|
||||
if (${LOCAL_BATCH_SCRIPT_COMMAND} STREQUAL "raybsub")
|
||||
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
|
||||
else ()
|
||||
execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
|
||||
endif ()
|
||||
endif ()
|
||||
message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml")
|
||||
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
|
||||
while(result)
|
||||
@ -296,7 +296,7 @@ message (STATUS "Dashboard script configuration:\n${vars}\n")
|
||||
file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/Test.xml ${CTEST_BINARY_DIRECTORY}/Testing/${TAG_CONTENTS}/SerialTest.xml)
|
||||
file (RENAME ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}.log ${CTEST_BINARY_DIRECTORY}/Testing/Temporary/LastTest_${TAG_CONTENTS}_Serial.log)
|
||||
unset(result CACHE)
|
||||
if ("${LOCAL_BATCH_SCRIPT_COMMAND}" STREQUAL "raybsub")
|
||||
if (${LOCAL_BATCH_SCRIPT_COMMAND} STREQUAL "raybsub")
|
||||
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
|
||||
else ()
|
||||
execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
|
||||
|
@ -33,17 +33,8 @@ set (LOCAL_BATCH_TEST "TRUE")
|
||||
set (LOCAL_BATCH_SCRIPT_NAME "ctestS.lsf")
|
||||
set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ctestP.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=ctestS.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=ctestP.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=srun")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-n")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
|
||||
|
||||
#############################################################################################
|
||||
### some additions and alternatives to cross compile on haswell for knl
|
||||
#set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
|
||||
#set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
|
||||
#set (SITE_BUILDNAME_SUFFIX "knl-intel17-SHARED"
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl")
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl")
|
||||
#############################################################################################
|
||||
|
@ -33,17 +33,8 @@ set (LOCAL_BATCH_TEST "TRUE")
|
||||
set (LOCAL_BATCH_SCRIPT_NAME "ray_ctestS.lsf")
|
||||
set (LOCAL_BATCH_SCRIPT_PARALLEL_NAME "ray_ctestP.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_TEST:BOOL=ON")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=ray_ctestS.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=ray_ctestP.lsf")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=${LOCAL_BATCH_SCRIPT_NAME}")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=${LOCAL_BATCH_SCRIPT_PARALLEL_NAME}")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_EXECUTABLE:STRING=mpirun")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_NUMPROC_FLAG:STRING=-np")
|
||||
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DMPIEXEC_MAX_NUMPROCS:STRING=6")
|
||||
|
||||
#############################################################################################
|
||||
### some additions and alternatives to cross compile on haswell for knl
|
||||
#set (COMPILENODE_HWCOMPILE_MODULE "craype-haswell")
|
||||
#set (COMPUTENODE_HWCOMPILE_MODULE "craype-mic-knl")
|
||||
#set (SITE_BUILDNAME_SUFFIX "knl-intel17-SHARED"
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_NAME:STRING=knl_ctestS.sl")
|
||||
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLOCAL_BATCH_SCRIPT_PARALLEL_NAME:STRING=knl_ctestP.sl")
|
||||
#############################################################################################
|
||||
|
@ -8,13 +8,3 @@ set(CMAKE_Fortran_COMPILER ftn)
|
||||
|
||||
# the following is used if cross-compiling
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR "")
|
||||
|
||||
# option to use pre-generated H5Tinit.c file
|
||||
set(HDF5_USE_PREGEN OFF)
|
||||
# directory where H5Tinit.c file will be found
|
||||
#set(HDF5_USE_PREGEN_DIR "/lscratch1/lknox/HDF5_1_10_4/CMake-hdf5-1.10.4")
|
||||
|
||||
# option to generate H5Tinit.c by running H5detect on knl compute node during build
|
||||
#set(HDF5_BATCH_H5DETECT ON)
|
||||
#set(HDF5_BATCH_CMD "sbatch")
|
||||
#set(HDF5_BATCH_H5DETECT_SCRIPT "knl_H5detect.sl")
|
||||
|
@ -944,7 +944,7 @@ if (BUILD_SHARED_LIBS)
|
||||
endif ()
|
||||
|
||||
if (LOCAL_BATCH_TEST)
|
||||
if ("${LOCAL_BATCH_SCRIPT_COMMAND}" STREQUAL "raybsub")
|
||||
if (${LOCAL_BATCH_SCRIPT_COMMAND} STREQUAL "raybsub")
|
||||
configure_file (
|
||||
${HDF5_SOURCE_DIR}/bin/batch/${LOCAL_BATCH_SCRIPT_COMMAND}
|
||||
${HDF5_BINARY_DIR}/${LOCAL_BATCH_SCRIPT_COMMAND} ESCAPE_QUOTES @ONLY
|
||||
|
@ -231,47 +231,31 @@ add_test (NAME H5TEST-clear-testhdf5-objects
|
||||
)
|
||||
set_tests_properties (H5TEST-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP clear_testhdf5)
|
||||
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
|
||||
set_tests_properties (H5TEST-testhdf5-base PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
|
||||
set_tests_properties (H5TEST-testhdf5-heap PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
|
||||
set_tests_properties (H5TEST-testhdf5-file PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
|
||||
set_tests_properties (H5TEST-testhdf5-select PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
else ()
|
||||
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
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
|
||||
set_tests_properties (H5TEST-testhdf5-base PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
|
||||
set_tests_properties (H5TEST-testhdf5-heap PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
|
||||
set_tests_properties (H5TEST-testhdf5-file PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
add_test (NAME H5TEST-testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
|
||||
set_tests_properties (H5TEST-testhdf5-select PROPERTIES
|
||||
FIXTURES_REQUIRED clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (NAME H5TEST-shared-clear-testhdf5-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -298,19 +282,28 @@ else ()
|
||||
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
|
||||
)
|
||||
set_tests_properties (H5TEST-shared-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP shared_clear_testhdf5)
|
||||
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
|
||||
add_test (NAME H5TEST-shared-testhdf5-base COMMAND $<TARGET_FILE:testhdf5-shared> -x heap -x file -x select)
|
||||
set_tests_properties (H5TEST-shared-testhdf5-base PROPERTIES
|
||||
FIXTURES_REQUIRED shared_clear_testhdf5
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
|
||||
)
|
||||
add_test (NAME H5TEST-shared-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5-shared> -o heap)
|
||||
set_tests_properties (H5TEST-shared-testhdf5-heap PROPERTIES
|
||||
FIXTURES_REQUIRED shared_clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
|
||||
)
|
||||
add_test (NAME H5TEST-shared-testhdf5-file COMMAND $<TARGET_FILE:testhdf5-shared> -o file)
|
||||
set_tests_properties (H5TEST-shared-testhdf5-file PROPERTIES
|
||||
FIXTURES_REQUIRED shared_clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
|
||||
)
|
||||
add_test (NAME H5TEST-shared-testhdf5-select COMMAND $<TARGET_FILE:testhdf5-shared> -o select)
|
||||
set_tests_properties (H5TEST-shared-testhdf5-select PROPERTIES
|
||||
FIXTURES_REQUIRED shared_clear_testhdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
|
||||
)
|
||||
endif ()
|
||||
|
@ -111,32 +111,48 @@ endif ()
|
||||
if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
|
||||
if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
|
||||
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}/${vfdname}-${vfdtest}.out
|
||||
${vfdname}/${vfdname}-${vfdtest}.out.err
|
||||
)
|
||||
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=${vfdname}-${vfdtest}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-${test}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
|
||||
)
|
||||
@ -152,64 +168,96 @@ endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}/${vfdname}-${vfdtest}.out
|
||||
${vfdname}/${vfdname}-${vfdtest}.out.err
|
||||
)
|
||||
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=${vfdname}-${vfdtest}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-${test}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}/${vfdname}-${vfdtest}.out
|
||||
${vfdname}/${vfdname}-${vfdtest}.out.err
|
||||
)
|
||||
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=${vfdname}-${vfdtest}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-${vfdtest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
|
||||
)
|
||||
@ -218,32 +266,48 @@ endif ()
|
||||
endmacro ()
|
||||
|
||||
macro (DO_VFD_TEST vfdtest vfdname resultcode)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}/${vfdname}-${vfdtest}.out
|
||||
${vfdname}/${vfdname}-${vfdtest}.out.err
|
||||
)
|
||||
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=${vfdname}-${vfdtest}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
|
||||
${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-${vfdtest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
|
||||
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
|
||||
)
|
||||
@ -277,33 +341,49 @@ endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
if (HDF5_TEST_FHEAP_VFD)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-fheap-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}/${vfdname}-fheap.out
|
||||
${vfdname}/${vfdname}-fheap.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-fheap
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-fheap"
|
||||
-D "TEST_OUTPUT=${vfdname}-fheap.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-fheap-clear-objects
|
||||
TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VFD-${vfdname}-fheap-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-fheap-shared.out
|
||||
${vfdname}-shared/${vfdname}-fheap-shared.out.err
|
||||
)
|
||||
add_test (NAME VFD-${vfdname}-fheap-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${vfdname}-fheap-shared"
|
||||
-D "TEST_OUTPUT=${vfdname}-fheap-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
|
||||
DEPENDS VFD-${vfdname}-fheap-shared-clear-objects
|
||||
TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
|
||||
|
@ -108,32 +108,48 @@ endif ()
|
||||
if ("${voltest}" STREQUAL "flush1" OR "${voltest}" STREQUAL "flush2")
|
||||
if ("${volname}" STREQUAL "multi" OR "${volname}" STREQUAL "split")
|
||||
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}/${volname}-${voltest}.out
|
||||
${volname}/${volname}-${voltest}.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (NAME VOL-${volname}-${test}-shared
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}-shared/${volname}-${voltest}-shared.out
|
||||
${volname}-shared/${volname}-${voltest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
|
||||
)
|
||||
@ -143,70 +159,102 @@ endif ()
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}"
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (NAME VOL-${volname}-${test}-shared
|
||||
add_test (NAME VOL-${volname}-${voltest}-shared
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}-shared"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}/${volname}-${voltest}.out
|
||||
${volname}/${volname}-${voltest}.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (NAME VOL-${volname}-${test}-shared
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}-shared/${volname}-${voltest}-shared.out
|
||||
${volname}-shared/${volname}-${voltest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}/${volname}-${voltest}.out
|
||||
${volname}/${volname}-${voltest}.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS AND NOT "${voltest}" STREQUAL "cache")
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}-shared/${volname}-${voltest}-shared.out
|
||||
${volname}-shared/${volname}-${voltest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
|
||||
)
|
||||
@ -216,32 +264,48 @@ endif ()
|
||||
|
||||
macro (DO_VOL_TEST voltest volname volinfo resultcode)
|
||||
#message(STATUS "${voltest}-${volname} with ${volinfo}")
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}/${volname}-${voltest}.out
|
||||
${volname}/${volname}-${voltest}.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VOL-${volname}-${voltest}-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}-shared/${volname}-${voltest}-shared.out
|
||||
${volname}-shared/${volname}-${voltest}-shared.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-${voltest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared"
|
||||
-D "TEST_OUTPUT=${volname}-${voltest}-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
|
||||
DEPENDS VOL-${volname}-${voltest}-shared-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
|
||||
)
|
||||
@ -276,33 +340,49 @@ endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
if (HDF5_TEST_FHEAP_VOL)
|
||||
add_test (
|
||||
NAME VOL-${volname}-fheap-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}/${volname}-fheap.out
|
||||
${volname}/${volname}-fheap.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-fheap
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-fheap"
|
||||
-D "TEST_OUTPUT=${volname}-fheap.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-fheap PROPERTIES
|
||||
DEPENDS VOL-${volname}-fheap-clear-objects
|
||||
TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_test (
|
||||
NAME VOL-${volname}-fheap-shared-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${volname}-shared/${volname}-fheap-shared.out
|
||||
${volname}-shared/${volname}-fheap-shared.out.err
|
||||
)
|
||||
add_test (NAME VOL-${volname}-fheap-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VOL:STRING=${volinfo}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${volname}-fheap-shared"
|
||||
-D "TEST_OUTPUT=${volname}-fheap-shared.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
|
||||
-P "${HDF_RESOURCES_DIR}/volTest.cmake"
|
||||
)
|
||||
set_tests_properties (VOL-${volname}-fheap-shared PROPERTIES
|
||||
DEPENDS VOL-${volname}-fheap-shared-clear-objects
|
||||
TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
|
||||
|
328
test/testframe.c
328
test/testframe.c
@ -15,7 +15,7 @@
|
||||
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
|
||||
* Tuesday, January 6, 2004
|
||||
*
|
||||
* Purpose: Provides support functions for the testing framework.
|
||||
* Purpose: Provides support functions for the testing framework.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -28,24 +28,25 @@
|
||||
#define MAXTESTDESC 64
|
||||
|
||||
typedef struct TestStruct {
|
||||
int NumErrors;
|
||||
char Description[MAXTESTDESC];
|
||||
int SkipFlag;
|
||||
char Name[MAXTESTNAME];
|
||||
void (*Call)(void);
|
||||
void (*Cleanup)(void);
|
||||
const void *Parameters;
|
||||
int NumErrors;
|
||||
char Description[MAXTESTDESC];
|
||||
int SkipFlag;
|
||||
char Name[MAXTESTNAME];
|
||||
void (*Call)(void);
|
||||
void (*Cleanup)(void);
|
||||
const void *Parameters;
|
||||
} TestStruct;
|
||||
|
||||
|
||||
/*
|
||||
* Variables used by testing framework.
|
||||
*/
|
||||
static int enable_error_stack = 0; /* enable error stack; disable=0 enable=1 */
|
||||
static int num_errs = 0; /* Total number of errors during testing */
|
||||
int TestVerbosity = VERBO_DEF; /* Default Verbosity is Low */
|
||||
static int Summary = 0; /* Show test summary. Default is no. */
|
||||
static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
|
||||
static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
|
||||
static int Summary = 0; /* Show test summary. Default is no. */
|
||||
static int CleanUp = 1; /* Do cleanup or not. Default is yes. */
|
||||
static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */
|
||||
static TestStruct *Test = NULL; /* Array of tests */
|
||||
static unsigned TestAlloc = 0; /* Size of the Test array */
|
||||
static unsigned Index = 0;
|
||||
@ -54,7 +55,7 @@ static const char *TestProgName = NULL;
|
||||
static void (*TestPrivateUsage)(void) = NULL;
|
||||
static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Setup a test function and add it to the list of tests.
|
||||
* It must have no parameters and returns void.
|
||||
@ -74,12 +75,12 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
|
||||
/* Sanity checking */
|
||||
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
|
||||
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n",
|
||||
TheDescr, MAXTESTDESC);
|
||||
TheDescr, MAXTESTDESC);
|
||||
exit(EXIT_FAILURE);
|
||||
} /* end if */
|
||||
if (HDstrlen(TheName) >= MAXTESTNAME) {
|
||||
printf("Test name too long, increase MAXTESTNAME(%d).\n",
|
||||
MAXTESTNAME);
|
||||
MAXTESTNAME);
|
||||
exit(EXIT_FAILURE);
|
||||
} /* end if */
|
||||
|
||||
@ -102,12 +103,12 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
|
||||
/* Set up test function */
|
||||
HDstrcpy(Test[Index].Description, TheDescr);
|
||||
if(*TheName != '-') {
|
||||
HDstrcpy(Test[Index].Name, TheName);
|
||||
Test[Index].SkipFlag = 0;
|
||||
HDstrcpy(Test[Index].Name, TheName);
|
||||
Test[Index].SkipFlag = 0;
|
||||
}
|
||||
else { /* skip test by default */
|
||||
HDstrcpy(Test[Index].Name, TheName+1);
|
||||
Test[Index].SkipFlag = 1;
|
||||
else { /* skip test by default */
|
||||
HDstrcpy(Test[Index].Name, TheName+1);
|
||||
Test[Index].SkipFlag = 1;
|
||||
}
|
||||
Test[Index].Call = TheCall;
|
||||
Test[Index].Cleanup = Cleanup;
|
||||
@ -118,7 +119,7 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
|
||||
Index++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Initialize testing framework
|
||||
*
|
||||
@ -130,8 +131,8 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
|
||||
* private options. Default to NULL which means none is provided.
|
||||
*
|
||||
* Modifications:
|
||||
* Albert Cheng 2004/08/17
|
||||
* Added the ProgName, private_usage and private_parser arguments.
|
||||
* Albert Cheng 2004/08/17
|
||||
* Added the ProgName, private_usage and private_parser arguments.
|
||||
*/
|
||||
void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_parser)(int ac, char *av[]))
|
||||
{
|
||||
@ -140,7 +141,8 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
|
||||
* half the functions this test calls are private, so automatic error
|
||||
* reporting wouldn't do much good since it's triggered at the API layer.
|
||||
*/
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
if (enable_error_stack == 0)
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
|
||||
/*
|
||||
* Record the program name and private routines if provided.
|
||||
@ -152,50 +154,50 @@ void TestInit(const char *ProgName, void (*private_usage)(void), int (*private_p
|
||||
TestPrivateParser = private_parser;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Print test usage.
|
||||
* First print the common test options, then the extra options if provided.
|
||||
* First print the common test options, then the extra options if provided.
|
||||
*
|
||||
* Modification:
|
||||
* 2004/08/18 Albert Cheng. Add TestPrivateUsage feature.
|
||||
* 2004/08/18 Albert Cheng. Add TestPrivateUsage feature.
|
||||
*/
|
||||
void TestUsage(void)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned i;
|
||||
|
||||
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
|
||||
TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
|
||||
print_func(" [-[e]x[clude] name]+ \n");
|
||||
print_func(" [-o[nly] name]+ \n");
|
||||
print_func(" [-b[egin] name] \n");
|
||||
print_func(" [-s[ummary]] \n");
|
||||
print_func(" [-c[leanoff]] \n");
|
||||
print_func(" [-h[elp]] \n");
|
||||
print_func("\n\n");
|
||||
print_func("verbose controls the amount of information displayed\n");
|
||||
print_func("exclude to exclude tests by name\n");
|
||||
print_func("only to name tests which should be run\n");
|
||||
print_func("begin start at the name of the test givin\n");
|
||||
print_func("summary prints a summary of test results at the end\n");
|
||||
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
|
||||
print_func("help print out this information\n");
|
||||
if (TestPrivateUsage){
|
||||
print_func("\nExtra options\n");
|
||||
TestPrivateUsage();
|
||||
}
|
||||
print_func("\n\n");
|
||||
print_func("This program currently tests the following: \n\n");
|
||||
print_func("%16s %s\n", "Name", "Description");
|
||||
print_func("%16s %s\n", "----", "-----------");
|
||||
print_func("Usage: %s [-v[erbose] (l[ow]|m[edium]|h[igh]|0-9)] %s\n",
|
||||
TestProgName, (TestPrivateUsage ? "<extra options>" : ""));
|
||||
print_func(" [-[e]x[clude] name]+ \n");
|
||||
print_func(" [-o[nly] name]+ \n");
|
||||
print_func(" [-b[egin] name] \n");
|
||||
print_func(" [-s[ummary]] \n");
|
||||
print_func(" [-c[leanoff]] \n");
|
||||
print_func(" [-h[elp]] \n");
|
||||
print_func("\n\n");
|
||||
print_func("verbose controls the amount of information displayed\n");
|
||||
print_func("exclude to exclude tests by name\n");
|
||||
print_func("only to name tests which should be run\n");
|
||||
print_func("begin start at the name of the test givin\n");
|
||||
print_func("summary prints a summary of test results at the end\n");
|
||||
print_func("cleanoff does not delete *.hdf files after execution of tests\n");
|
||||
print_func("help print out this information\n");
|
||||
if (TestPrivateUsage){
|
||||
print_func("\nExtra options\n");
|
||||
TestPrivateUsage();
|
||||
}
|
||||
print_func("\n\n");
|
||||
print_func("This program currently tests the following: \n\n");
|
||||
print_func("%16s %s\n", "Name", "Description");
|
||||
print_func("%16s %s\n", "----", "-----------");
|
||||
|
||||
for (i = 0; i < Index; i++)
|
||||
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
|
||||
for (i = 0; i < Index; i++)
|
||||
print_func("%16s %s\n", Test[i].Name, Test[i].Description);
|
||||
|
||||
print_func("\n\n");
|
||||
print_func("\n\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Print test info.
|
||||
*/
|
||||
@ -209,7 +211,7 @@ void TestInfo(const char *ProgName)
|
||||
print_func("Linked with hdf5 version %u.%u release %u\n", major, minor, release);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Parse command line information.
|
||||
* argc, argv: the usual command line argument count and strings
|
||||
@ -218,7 +220,7 @@ void TestInfo(const char *ProgName)
|
||||
* exit EXIT_FAILURE if error is encountered.
|
||||
*
|
||||
* Modification:
|
||||
* 2004/08/18 Albert Cheng. Add extra_parse feature.
|
||||
* 2004/08/18 Albert Cheng. Add extra_parse feature.
|
||||
*/
|
||||
void TestParseCmdLine(int argc, char *argv[])
|
||||
{
|
||||
@ -226,80 +228,82 @@ void TestParseCmdLine(int argc, char *argv[])
|
||||
int ret_code;
|
||||
|
||||
while (argv++, --argc > 0){
|
||||
if ((HDstrcmp(*argv, "-verbose") == 0) ||
|
||||
(HDstrcmp(*argv, "-v") == 0)) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
ParseTestVerbosity(*argv);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-exclude") == 0) ||
|
||||
(HDstrcmp(*argv, "-x") == 0))) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
SetTest(*argv, SKIPTEST);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-begin") == 0) ||
|
||||
(HDstrcmp(*argv, "-b") == 0))) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
SetTest(*argv, BEGINTEST);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-only") == 0) ||
|
||||
(HDstrcmp(*argv, "-o") == 0))) {
|
||||
if(argc > 0) {
|
||||
unsigned Loop;
|
||||
if ((HDstrcmp(*argv, "-verbose") == 0) ||
|
||||
(HDstrcmp(*argv, "-v") == 0)) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
ParseTestVerbosity(*argv);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-exclude") == 0) ||
|
||||
(HDstrcmp(*argv, "-x") == 0))) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
SetTest(*argv, SKIPTEST);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-begin") == 0) ||
|
||||
(HDstrcmp(*argv, "-b") == 0))) {
|
||||
if (argc > 0){
|
||||
--argc; ++argv;
|
||||
SetTest(*argv, BEGINTEST);
|
||||
}else{
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (((HDstrcmp(*argv, "-only") == 0) ||
|
||||
(HDstrcmp(*argv, "-o") == 0))) {
|
||||
if(argc > 0) {
|
||||
unsigned Loop;
|
||||
|
||||
--argc; ++argv;
|
||||
--argc; ++argv;
|
||||
|
||||
/* Skip all tests, then activate only one. */
|
||||
/* Skip all tests, then activate only one. */
|
||||
if(!skipped_all) {
|
||||
for(Loop = 0; Loop < Index; Loop++)
|
||||
Test[Loop].SkipFlag = 1;
|
||||
skipped_all = TRUE;
|
||||
} /* end if */
|
||||
SetTest(*argv, ONLYTEST);
|
||||
} /* end if */
|
||||
SetTest(*argv, ONLYTEST);
|
||||
} /* end if */
|
||||
else {
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
|
||||
Summary = 1;
|
||||
else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
|
||||
TestUsage();
|
||||
exit(EXIT_SUCCESS);
|
||||
TestUsage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
|
||||
SetTestNoCleanup();
|
||||
else {
|
||||
/* non-standard option. Break out. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
|
||||
Summary = 1;
|
||||
else if (HDstrcmp(*argv, "-enable-error-stack") == 0)
|
||||
enable_error_stack = 1;
|
||||
else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
|
||||
TestUsage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
|
||||
SetTestNoCleanup();
|
||||
else {
|
||||
/* non-standard option. Break out. */
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Call extra parsing function if provided. */
|
||||
if (NULL != TestPrivateParser){
|
||||
ret_code=TestPrivateParser(argc+1, argv-1);
|
||||
if (ret_code != 0)
|
||||
exit(EXIT_FAILURE);
|
||||
ret_code=TestPrivateParser(argc+1, argv-1);
|
||||
if (ret_code != 0)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Perform Tests.
|
||||
*/
|
||||
@ -314,10 +318,10 @@ void PerformTests(void)
|
||||
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
|
||||
MESSAGE(5, ("===============================================\n"));
|
||||
Test[Loop].NumErrors = num_errs;
|
||||
Test_parameters = Test[Loop].Parameters;
|
||||
ALARM_ON;
|
||||
Test_parameters = Test[Loop].Parameters;
|
||||
ALARM_ON;
|
||||
Test[Loop].Call();
|
||||
ALARM_OFF;
|
||||
ALARM_OFF;
|
||||
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
|
||||
MESSAGE(5, ("===============================================\n"));
|
||||
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
|
||||
@ -332,7 +336,7 @@ void PerformTests(void)
|
||||
print_func("All tests were successful. \n\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Display test summary.
|
||||
*/
|
||||
@ -354,7 +358,7 @@ void TestSummary(void)
|
||||
print_func("\n\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Cleanup files from testing
|
||||
*/
|
||||
@ -370,7 +374,7 @@ void TestCleanup(void)
|
||||
Test[Loop].Cleanup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Shutdown the test infrastructure
|
||||
*/
|
||||
@ -380,7 +384,7 @@ void TestShutdown(void)
|
||||
HDfree(Test);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Retrieve the verbosity level for the testing framework
|
||||
*/
|
||||
@ -504,16 +508,16 @@ int SetTestNoCleanup(void)
|
||||
void ParseTestVerbosity(char *argv)
|
||||
{
|
||||
if (*argv == 'l')
|
||||
SetTestVerbosity(VERBO_LO);
|
||||
SetTestVerbosity(VERBO_LO);
|
||||
else if (*argv == 'm')
|
||||
SetTestVerbosity(VERBO_MED);
|
||||
SetTestVerbosity(VERBO_MED);
|
||||
else if (*argv == 'h')
|
||||
SetTestVerbosity(VERBO_HI);
|
||||
SetTestVerbosity(VERBO_HI);
|
||||
else
|
||||
SetTestVerbosity(atoi(argv));
|
||||
SetTestVerbosity(atoi(argv));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Retrieve the number of testing errors for the testing framework
|
||||
*/
|
||||
@ -522,7 +526,7 @@ H5_ATTR_PURE int GetTestNumErrs(void)
|
||||
return(num_errs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Increment the number of testing errors
|
||||
*/
|
||||
@ -531,7 +535,7 @@ void IncTestNumErrs(void)
|
||||
num_errs++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Retrieve the current Test Parameters pointer.
|
||||
*/
|
||||
@ -540,7 +544,7 @@ H5_ATTR_PURE const void *GetTestParameters(void)
|
||||
return(Test_parameters);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This routine is designed to provide equivalent functionality to 'printf'
|
||||
* and also increment the error count for the testing framework.
|
||||
@ -563,7 +567,7 @@ TestErrPrintf(const char *format, ...)
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Set (control) which test will be tested.
|
||||
* SKIPTEST: skip this test
|
||||
@ -576,41 +580,41 @@ void SetTest(const char *testname, int action)
|
||||
unsigned Loop;
|
||||
|
||||
switch (action){
|
||||
case SKIPTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++)
|
||||
if (HDstrcmp(testname, Test[Loop].Name) == 0){
|
||||
Test[Loop].SkipFlag = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BEGINTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (HDstrcmp(testname, Test[Loop].Name) != 0)
|
||||
Test[Loop].SkipFlag = 1;
|
||||
else{
|
||||
/* Found it. Set it to run. Done. */
|
||||
Test[Loop].SkipFlag = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ONLYTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (HDstrcmp(testname, Test[Loop].Name) == 0) {
|
||||
/* Found it. Set it to run. Break to skip the rest. */
|
||||
Test[Loop].SkipFlag = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* error */
|
||||
printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
|
||||
break;
|
||||
case SKIPTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++)
|
||||
if (HDstrcmp(testname, Test[Loop].Name) == 0){
|
||||
Test[Loop].SkipFlag = 1;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case BEGINTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (HDstrcmp(testname, Test[Loop].Name) != 0)
|
||||
Test[Loop].SkipFlag = 1;
|
||||
else{
|
||||
/* Found it. Set it to run. Done. */
|
||||
Test[Loop].SkipFlag = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ONLYTEST:
|
||||
for (Loop = 0; Loop < Index; Loop++) {
|
||||
if (HDstrcmp(testname, Test[Loop].Name) == 0) {
|
||||
/* Found it. Set it to run. Break to skip the rest. */
|
||||
Test[Loop].SkipFlag = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* error */
|
||||
printf("*** ERROR: Unknown action (%d) for SetTest\n", action);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Enable alarm on test execution, configurable by environment variable
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@ set (H5P_TESTS
|
||||
t_mpi
|
||||
t_bigio
|
||||
t_cache
|
||||
t_cache_image
|
||||
#t_cache_image
|
||||
t_pflush1
|
||||
t_pflush2
|
||||
t_pread
|
||||
|
@ -15,17 +15,83 @@
|
||||
### T E S T I N G ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# Remove any output file left over from previous test run
|
||||
add_test (NAME MPI_TEST-clear-testphdf5-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
ParaTest.h5
|
||||
WORKING_DIRECTORY
|
||||
${HDF5_TEST_PAR_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties (MPI_TEST-clear-testphdf5-objects PROPERTIES FIXTURES_SETUP par_clear_testphdf5)
|
||||
|
||||
add_test (NAME MPI_TEST_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:testphdf5> ${MPIEXEC_POSTFLAGS})
|
||||
set (SKIP_testphdf5 "")
|
||||
#if (${HDF5_OPENMPI_VERSION_SKIP})
|
||||
# set (SKIP_testphdf5 "${SKIP_testphdf5};-x;ecdsetw")
|
||||
#endif ()
|
||||
|
||||
add_test (NAME MPI_TEST_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:testphdf5> ${MPIEXEC_POSTFLAGS} ${SKIP_testphdf5})
|
||||
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES
|
||||
FIXTURES_REQUIRED par_clear_testphdf5
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
|
||||
)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DEPENDS ${last_test})
|
||||
endif ()
|
||||
set (last_test "MPI_TEST_testphdf5")
|
||||
|
||||
#if (${HDF5_OPENMPI_VERSION_SKIP})
|
||||
# list (REMOVE_ITEM H5P_TESTS t_shapesame)
|
||||
#endif ()
|
||||
|
||||
set (test_par_CLEANFILES
|
||||
t_cache_image_00.h5
|
||||
t_cache_image_01.h5
|
||||
t_cache_image_02.h5
|
||||
flush.h5
|
||||
noflush.h5
|
||||
reloc_t_pread_data_file.h5
|
||||
reloc_t_pread_group_0_file.h5
|
||||
reloc_t_pread_group_1_file.h5
|
||||
shutdown.h5
|
||||
after_mpi_fin.h5
|
||||
#the following should have been removed by the programs
|
||||
bigio_test.h5
|
||||
CacheTestDummy.h5
|
||||
t_filters_parallel.h5
|
||||
MPItest.h5
|
||||
ShapeSameTest.h5
|
||||
)
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
add_test (NAME MPI_TEST-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${test_par_CLEANFILES}
|
||||
WORKING_DIRECTORY
|
||||
${HDF5_TEST_PAR_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties (MPI_TEST-clear-objects PROPERTIES FIXTURES_SETUP par_clear_objects)
|
||||
|
||||
foreach (testp ${H5P_TESTS})
|
||||
add_test (NAME MPI_TEST_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${testp}> ${MPIEXEC_POSTFLAGS})
|
||||
set_tests_properties (MPI_TEST_${testp} PROPERTIES
|
||||
FIXTURES_REQUIRED par_clear_objects
|
||||
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
|
||||
)
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
set_tests_properties (MPI_TEST_${testp} PROPERTIES DEPENDS ${last_test})
|
||||
endif ()
|
||||
set (last_test "MPI_TEST_${testp}")
|
||||
endforeach ()
|
||||
|
||||
# The t_pflush1 test is hard-coded to fail.
|
||||
set_tests_properties (MPI_TEST_t_pflush1 PROPERTIES WILL_FAIL "true")
|
||||
#set_property (TEST MPI_TEST_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
|
||||
set_tests_properties (MPI_TEST_t_pflush2 PROPERTIES DEPENDS MPI_TEST_t_pflush1)
|
||||
set_tests_properties (MPI_TEST_t_prestart PROPERTIES DEPENDS MPI_TEST_t_pshutdown)
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
|
@ -33,9 +33,20 @@
|
||||
set (VFD_LIST ${VFD_LIST} direct)
|
||||
endif ()
|
||||
|
||||
foreach (vfdtest ${VFD_LIST})
|
||||
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
|
||||
endforeach ()
|
||||
|
||||
macro (ADD_VFD_TEST vfdname resultcode)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
foreach (test ${H5P_VFD_TESTS})
|
||||
add_test (
|
||||
NAME MPI_TEST_VFD-${vfdname}-${test}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
${vfdname}-shared/${vfdname}-${test}.out
|
||||
${vfdname}-shared/${vfdname}-${test}.out.err
|
||||
)
|
||||
add_test (
|
||||
NAME MPI_TEST_VFD-${vfdname}-${test}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -43,10 +54,15 @@
|
||||
-D "TEST_ARGS:STRING="
|
||||
-D "TEST_VFD:STRING=${vfdname}"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_OUTPUT=${test}"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
|
||||
-D "TEST_OUTPUT=${vfdname}-${test}.out"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
|
||||
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
||||
)
|
||||
set_tests_properties (MPI_TEST_VFD-${vfdname}-${test} PROPERTIES
|
||||
DEPENDS MPI_TEST_VFD-${vfdname}-${test}-clear-objects
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
endforeach ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
Loading…
Reference in New Issue
Block a user