summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-16 16:16:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-16 16:16:19 (GMT)
commit792a75afe165a5120f53129bc7e87797e5643737 (patch)
treef6248977a6d865d17e76f10675acd452e0701ed9
parentfc8866d41e0b585b6c6f3e2ec7fd012d543e2624 (diff)
parent08b5edca0b6df7c50696ecf777ae5f108b19a953 (diff)
downloadhdf5-792a75afe165a5120f53129bc7e87797e5643737.zip
hdf5-792a75afe165a5120f53129bc7e87797e5643737.tar.gz
hdf5-792a75afe165a5120f53129bc7e87797e5643737.tar.bz2
Merge pull request #296 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '08b5edca0b6df7c50696ecf777ae5f108b19a953': Fix parallel h5diff test comapare Set depends test dependency for parallel h5diff Convert string APPEND to set commands Revert whitespace Close file before trying to remove it
-rw-r--r--config/cmake_ext_mod/FindMPI.cmake22
-rw-r--r--config/cmake_ext_mod/runTest.cmake28
-rw-r--r--test/cache_image.c7
-rw-r--r--tools/test/h5diff/CMakeTests.cmake13
4 files changed, 51 insertions, 19 deletions
diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake
index 1a02f82..5e8084c 100644
--- a/config/cmake_ext_mod/FindMPI.cmake
+++ b/config/cmake_ext_mod/FindMPI.cmake
@@ -114,9 +114,10 @@ include(GetPrerequisites)
#
# Start out with the generic MPI compiler names, as these are most commonly used.
-set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r)
+set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r mpicc.bat)
set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++
- mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r)
+ mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r
+ mpicxx.bat)
set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r
mpif90 mpif90_r mpf90 mpf90_r
mpif77 mpif77_r mpf77 mpf77_r)
@@ -128,9 +129,9 @@ set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r
mpig77 mpig77_r mpg77 mpg77_r)
# Intel MPI compiler names
-set(_MPI_Intel_C_COMPILER_NAMES mpiicc)
-set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC)
-set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77)
+set(_MPI_Intel_C_COMPILER_NAMES mpiicc mpiicc.bat)
+set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC mpiicpc.bat)
+set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77 mpiifort.bat)
# PGI compiler names
set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc)
@@ -315,7 +316,7 @@ function (interrogate_mpi_compiler lang try_libs)
foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
if (MPI_COMPILE_FLAGS_WORK)
- string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}")
+ set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
else()
set(MPI_COMPILE_FLAGS_WORK ${FLAG})
endif()
@@ -326,6 +327,8 @@ function (interrogate_mpi_compiler lang try_libs)
foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
string(REPLACE "//" "/" IPATH ${IPATH})
+ string(REPLACE "\"" "" IPATH ${IPATH})
+ file(TO_CMAKE_PATH "${IPATH}" IPATH)
list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
endforeach()
@@ -364,7 +367,7 @@ function (interrogate_mpi_compiler lang try_libs)
set(MPI_LINK_FLAGS_WORK)
foreach(FLAG ${MPI_ALL_LINK_FLAGS})
if (MPI_LINK_FLAGS_WORK)
- string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}")
+ set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
else()
set(MPI_LINK_FLAGS_WORK ${FLAG})
endif()
@@ -386,8 +389,7 @@ function (interrogate_mpi_compiler lang try_libs)
# in the showme list that can only be found in the implicit
# link directories of the compiler.
if (DEFINED CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES)
- string(APPEND MPI_LINK_PATH
- ";${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}")
+ set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}")
endif ()
# Determine full path names for all of the libraries that one needs
@@ -466,7 +468,7 @@ function (interrogate_mpi_compiler lang try_libs)
if (MPI_INCLUDE_PATH_WORK AND MPI_HEADER_PATH)
list(APPEND MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH})
endif()
-
+
set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
find_library(MPI_LIB
NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 804c80f..0a77dae 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -144,6 +144,13 @@ if (TEST_FILTER)
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()
+if (TEST_REF_FILTER)
+ #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
+ file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+ STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+endif (TEST_REF_FILTER)
+
# compare output files to references unless this must be skipped
if (NOT TEST_SKIP_COMPARE)
if (WIN32 AND NOT MINGW)
@@ -151,11 +158,22 @@ if (NOT TEST_SKIP_COMPARE)
file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
endif ()
- # now compare the output with the reference
- execute_process (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
+ if (NOT TEST_SORT_COMPARE)
+ # now compare the output with the reference
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ else ()
+ file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+ file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+ list (SORT v1)
+ list (SORT v2)
+ if (NOT v1 STREQUAL v2)
+ set(TEST_RESULT 1)
+ endif ()
+ endif ()
+
if (NOT ${TEST_RESULT} STREQUAL 0)
set (TEST_RESULT 0)
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
diff --git a/test/cache_image.c b/test/cache_image.c
index c91914d..946d46b 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -6305,6 +6305,13 @@ cache_image_api_error_check_3(void)
if ( pass ) {
+ if ( H5Fclose(file_id) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fclose() failed.\n";
+
+ }
+
if ( HDremove(filename) < 0 ) {
pass = FALSE;
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index d098746..064e1dd 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -370,13 +370,18 @@
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${resultfile}.txt"
-# -D "TEST_APPEND=EXIT CODE: [0-9]"
-# -D "TEST_REF_FILTER=EXIT CODE: 0"
- -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_APPEND=EXIT CODE:"
+ -D "TEST_REF_APPEND=EXIT CODE: [0-9]"
+ -D "TEST_REF_FILTER=EXIT CODE: 0"
+ -D "TEST_SORT_COMPARE=TRUE"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "PH5DIFF-${resultfile}")
endif ()
ENDMACRO ()