summaryrefslogtreecommitdiffstats
path: root/tools/test/h5diff
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-13 20:45:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-13 20:45:30 (GMT)
commit509b6c24a7793b8fddd15a6abb6f9573f7adae3e (patch)
tree1b82e8b527b8de093f8f29e42332296c8ee4c8f7 /tools/test/h5diff
parentbd85e57904f1f943774bb99ea5e8b0d074db0edb (diff)
parent110073450f84fb373a6f28579cdc5751c3eca3b0 (diff)
downloadhdf5-509b6c24a7793b8fddd15a6abb6f9573f7adae3e.zip
hdf5-509b6c24a7793b8fddd15a6abb6f9573f7adae3e.tar.gz
hdf5-509b6c24a7793b8fddd15a6abb6f9573f7adae3e.tar.bz2
Merge pull request #251 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '110073450f84fb373a6f28579cdc5751c3eca3b0': Add unused -parameters to developer group. Add addition hint info about option Correct variable name Missing file remove added to test Update developer flags to account for gcc version Move Windows level 4 warnings to developer option Fix test output file name Changed severity of message state Remove duplicate command CMake command cleanup HDFFV-10094: upgrade cmake command conventions Also converted tests to use macros Update cmake min version and cmake command convention
Diffstat (limited to 'tools/test/h5diff')
-rw-r--r--tools/test/h5diff/CMakeLists.txt4
-rw-r--r--tools/test/h5diff/CMakeTests.cmake36
2 files changed, 26 insertions, 14 deletions
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index 2507664..1d13e14 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
PROJECT (HDF5_TOOLS_TEST_H5DIFF)
#-----------------------------------------------------------------------------
@@ -17,6 +17,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
- endif (HDF5_BUILD_GENERATORS)
+ endif ()
include (CMakeTests.cmake)
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 3687574..8a2781e 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -273,6 +273,9 @@
# Make testfiles dir under build dir
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (H5_HAVE_PARALLEL)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
+ endif ()
#
# copy test files from source to build dir
@@ -280,6 +283,9 @@
foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
get_filename_component(fname "${h5_tstfiles}" NAME)
HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}" "h5diff_files")
+ endif ()
endforeach ()
@@ -290,11 +296,17 @@
foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
get_filename_component(fname "${h5_tstfiles}" NAME)
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}.txt" "h5diff_files")
+ endif ()
endforeach ()
else ()
foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
get_filename_component(fname "${h5_tstfiles}" NAME)
HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ if (H5_HAVE_PARALLEL)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/PAR/testfiles/${fname}.txt" "h5diff_files")
+ endif ()
endforeach ()
endif ()
add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
@@ -316,7 +328,7 @@
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -329,40 +341,40 @@
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
if (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
endif ()
- ENDMACRO (ADD_H5_TEST file)
+ ENDMACRO ()
MACRO (ADD_PH5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
- set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME PH5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$<TARGET_FILE:ph5diff>"
-D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=P_${resultfile}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.txt"
# -D "TEST_APPEND=EXIT CODE: [0-9]"
# -D "TEST_REF_FILTER=EXIT CODE: 0"
-D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF_RESOURCES_EXT_DIR}/prunTest.cmake"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_PH5_TEST file)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
@@ -789,9 +801,9 @@
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5DIFF-clearall-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# ############################################################################
# # Common usage