summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-02-13 23:05:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-02-13 23:05:25 (GMT)
commit40589e28d8bd98a1af906e34c56b8b908a7eddab (patch)
tree3cc7bce865e0be1210d64633d59a379b47fb0805 /testpar
parent50b85e03300f4ba662038772cd6fd6fa84ecf97d (diff)
parentb95f05638ce40ccd944248f5865a248f39ef0d10 (diff)
downloadhdf5-40589e28d8bd98a1af906e34c56b8b908a7eddab.zip
hdf5-40589e28d8bd98a1af906e34c56b8b908a7eddab.tar.gz
hdf5-40589e28d8bd98a1af906e34c56b8b908a7eddab.tar.bz2
Merge pull request #1542 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'b95f05638ce40ccd944248f5865a248f39ef0d10': TRILAB-111 fixes for parallel testing
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt2
-rw-r--r--testpar/CMakeTests.cmake68
-rw-r--r--testpar/CMakeVFDTests.cmake20
3 files changed, 86 insertions, 4 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 0b3cbe3..71459c7 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -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
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index b71e7bc..12ccc58 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -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)
##############################################################################
##############################################################################
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index e2bf88a..de16a31 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -33,20 +33,36 @@
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}"
-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}"
+ -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 ()