2017-04-15 05:40:52 +08:00
|
|
|
#
|
|
|
|
# Copyright by The HDF Group.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This file is part of HDF5. The full HDF5 copyright notice, including
|
|
|
|
# terms governing use, modification, and redistribution, is contained in
|
|
|
|
# the COPYING file, which can be found at the root of the source code
|
|
|
|
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
|
|
|
|
# If you do not have access to either file, you may request a copy from
|
|
|
|
# help@hdfgroup.org.
|
|
|
|
#
|
2013-08-20 05:49:44 +08:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T E S T I N G ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
foreach (testp ${H5P_TESTS})
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
|
2017-01-11 07:09:53 +08:00
|
|
|
endforeach ()
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-04-29 23:26:35 +08:00
|
|
|
# The following will only be correct on windows shared
|
|
|
|
#set_tests_properties (TEST_PAR_t_pflush1 PROPERTIES WILL_FAIL "true")
|
2014-04-29 04:20:11 +08:00
|
|
|
set_property (TEST TEST_PAR_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
|
|
|
|
set_tests_properties (TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_TEST_VFD)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
set (VFD_LIST
|
2013-08-20 05:49:44 +08:00
|
|
|
sec2
|
|
|
|
stdio
|
|
|
|
core
|
|
|
|
split
|
|
|
|
multi
|
|
|
|
family
|
|
|
|
)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
set (H5P_VFD_TESTS
|
2013-08-20 05:49:44 +08:00
|
|
|
t_pflush1
|
|
|
|
t_pflush2
|
|
|
|
)
|
2017-01-11 07:09:53 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (DIRECT_VFD)
|
|
|
|
set (VFD_LIST ${VFD_LIST} direct)
|
2017-01-11 07:09:53 +08:00
|
|
|
endif ()
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2017-03-02 04:47:53 +08:00
|
|
|
macro (ADD_VFD_TEST vfdname resultcode)
|
2014-03-12 05:14:57 +08:00
|
|
|
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
|
|
|
foreach (test ${H5P_VFD_TESTS})
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (
|
2017-01-11 07:09:53 +08:00
|
|
|
NAME TEST_PAR_VFD-${vfdname}-${test}
|
2013-08-20 05:49:44 +08:00
|
|
|
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=${test}"
|
|
|
|
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
|
2014-05-15 03:50:28 +08:00
|
|
|
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
|
2013-08-20 05:49:44 +08:00
|
|
|
)
|
2017-01-11 07:09:53 +08:00
|
|
|
endforeach ()
|
|
|
|
endif ()
|
2017-03-02 04:47:53 +08:00
|
|
|
endmacro ()
|
2017-01-11 07:09:53 +08:00
|
|
|
|
2013-08-20 05:49:44 +08:00
|
|
|
# Run test with different Virtual File Driver
|
2014-03-12 05:14:57 +08:00
|
|
|
foreach (vfd ${VFD_LIST})
|
2013-08-20 05:49:44 +08:00
|
|
|
ADD_VFD_TEST (${vfd} 0)
|
2017-01-11 07:09:53 +08:00
|
|
|
endforeach ()
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2017-01-11 07:09:53 +08:00
|
|
|
endif ()
|