From f9674dfe4ea4e1054c6f7a862f2bac99bceedd36 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 9 Nov 2016 10:37:04 -0600 Subject: On windows there could be a conflict when two processes try to read the same file --- tools/test/h5dump/CMakeTests.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index dad3a8b..b08bcc5 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -183,6 +183,14 @@ ${HDF5_TOOLS_DIR}/testfiles/out3.h5import ${HDF5_TOOLS_DIR}/testfiles/zerodim.ddl ) + set (HDF5_N_REFERENCE_FILES + ${HDF5_TOOLS_DIR}/testfiles/tall-3 + ${HDF5_TOOLS_DIR}/testfiles/tattr-2 + ${HDF5_TOOLS_DIR}/testfiles/tcomp-2 + ${HDF5_TOOLS_DIR}/testfiles/thlink-4 + ${HDF5_TOOLS_DIR}/testfiles/thlink-5 + ${HDF5_TOOLS_DIR}/testfiles/tslink-2 + ) set (HDF5_REFERENCE_EXP_FILES tall-6.exp tnoddlfile.exp @@ -331,6 +339,10 @@ get_filename_component (fname "${tst_h5_file}" NAME) HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) + foreach (tst_h5_file ${HDF5_N_REFERENCE_TEST_FILES}) + get_filename_component (fname "${tst_h5_file}" NAME) + HDFTEST_COPY_FILE("${tst_h5_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}-N.ddl" "h5dump_std_files") + endforeach (tst_h5_file ${HDF5_N_REFERENCE_TEST_FILES}) foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) if (WIN32) @@ -466,7 +478,7 @@ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" -D "TEST_OUTPUT=${resultfile}-N.out" -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_REFERENCE=${resultfile}-N.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") -- cgit v0.12 From a2e6cb3c82ed9f237c2b8499d02296ede8be1836 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 9 Nov 2016 11:55:28 -0600 Subject: Factor out path --- tools/test/h5dump/CMakeTests.cmake | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index b08bcc5..a664e4e 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -184,12 +184,12 @@ ${HDF5_TOOLS_DIR}/testfiles/zerodim.ddl ) set (HDF5_N_REFERENCE_FILES - ${HDF5_TOOLS_DIR}/testfiles/tall-3 - ${HDF5_TOOLS_DIR}/testfiles/tattr-2 - ${HDF5_TOOLS_DIR}/testfiles/tcomp-2 - ${HDF5_TOOLS_DIR}/testfiles/thlink-4 - ${HDF5_TOOLS_DIR}/testfiles/thlink-5 - ${HDF5_TOOLS_DIR}/testfiles/tslink-2 + tall-3 + tattr-2 + tcomp-2 + thlink-4 + thlink-5 + tslink-2 ) set (HDF5_REFERENCE_EXP_FILES tall-6.exp @@ -339,10 +339,9 @@ get_filename_component (fname "${tst_h5_file}" NAME) HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) - foreach (tst_h5_file ${HDF5_N_REFERENCE_TEST_FILES}) - get_filename_component (fname "${tst_h5_file}" NAME) - HDFTEST_COPY_FILE("${tst_h5_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}-N.ddl" "h5dump_std_files") - endforeach (tst_h5_file ${HDF5_N_REFERENCE_TEST_FILES}) + foreach (tst_h5N_file ${HDF5_N_REFERENCE_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_h5N_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5N_file}-N.ddl" "h5dump_std_files") + endforeach (tst_h5N_file ${HDF5_N_REFERENCE_TEST_FILES}) foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) if (WIN32) -- cgit v0.12 From 94f09655cb2d7ade7a7357d0bfc54c564e7fe744 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 9 Nov 2016 12:39:22 -0600 Subject: Correct name of list --- tools/test/h5dump/CMakeTests.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index a664e4e..ad3c5ba 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -338,29 +338,29 @@ foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) get_filename_component (fname "${tst_h5_file}" NAME) HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") - endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) - foreach (tst_h5N_file ${HDF5_N_REFERENCE_TEST_FILES}) - HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_h5N_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5N_file}-N.ddl" "h5dump_std_files") - endforeach (tst_h5N_file ${HDF5_N_REFERENCE_TEST_FILES}) + endforeach () foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) if (WIN32) file (READ ${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file} TEST_STREAM) file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") - else (WIN32) + else () HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files") - endif (WIN32) - endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) + endif () + endforeach () foreach (tst_other_file ${HDF5_REFERENCE_FILES}) get_filename_component (fname "${tst_other_file}" NAME) HDFTEST_COPY_FILE("${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") - endforeach (tst_other_file ${HDF5_REFERENCE_FILES}) + endforeach () + foreach (tst_h5N_file ${HDF5_N_REFERENCE_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${tst_h5N_file}.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_h5N_file}-N.ddl" "h5dump_std_files") + endforeach () foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) get_filename_component (fname "${tst_error_file}" NAME) HDFTEST_COPY_FILE("${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") - endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) + endforeach () # -------------------------------------------------------------------- # Special file handling @@ -370,9 +370,9 @@ if (WIN32) file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM) file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") - else (WIN32) + else () HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files") - endif (WIN32) + endif () add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list}) ############################################################################## -- cgit v0.12 From e40faaa8fbc8490af626dd9da3ff741284327e65 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 10 Nov 2016 12:22:11 -0600 Subject: Update installdir format for windows --- config/cmake/scripts/HDF5config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 2874a74..2b1b097 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -82,7 +82,7 @@ set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") if(NOT DEFINED INSTALLDIR) if(WIN32) - set(INSTALLDIR "C:\\Program\ Files\\HDF_Group\\HDF5\\${CTEST_SOURCE_VERSION}") + set(INSTALLDIR "C:/Program Files/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}") else() set(INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF5/${CTEST_SOURCE_VERSION}") endif() @@ -232,7 +232,7 @@ endif() set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") ### change install prefix -set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH='${INSTALLDIR}'") +set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}") set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}") ################################################################### -- cgit v0.12