summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/CTestCustom.cmake5
-rw-r--r--config/cmake/jrunTest.cmake31
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake12
3 files changed, 40 insertions, 8 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 0e1eb2e..d5d96bb 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -1,4 +1,9 @@
set (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
+# Allow full output to go to CDash set to 0
+SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 50000)
+SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
+# WARNING! This could be a lot of output and could overwhelm CDash and the
+# MySQL DB so this might not be a good idea!
set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 0e0106f..67b42fb 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -25,6 +25,15 @@ if (NOT TEST_REFERENCE)
message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
endif ()
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+# if there is not an error reference file add the error output to the stdout file
if (NOT TEST_ERRREF)
if (NOT SKIP_APPEND)
# append error file since skip was not defined
@@ -60,6 +69,7 @@ execute_process (
message (STATUS "COMMAND Result: ${TEST_RESULT}")
+# if the .err file exists and ERRROR_APPEND is enabled
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
if (TEST_MASK_FILE)
@@ -75,6 +85,7 @@ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
endif ()
endif ()
+# if the output file or the .err file needs to mask out error stack info
if (TEST_MASK_ERROR)
if (NOT TEST_ERRREF)
# the error stack has been appended to the output file
@@ -125,7 +136,7 @@ if (NOT TEST_SKIP_COMPARE)
list (LENGTH test_act len_act)
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
list (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
@@ -137,6 +148,13 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endif ()
endforeach ()
+ else ()
+ if (${len_act} STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+ endif ()
+ if (${len_ref} STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+ endif ()
endif ()
if (NOT ${len_act} STREQUAL ${len_ref})
set (TEST_RESULT 1)
@@ -169,7 +187,7 @@ if (NOT TEST_SKIP_COMPARE)
file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
list (LENGTH test_ref len_ref)
math (EXPR _FP_LEN "${len_ref} - 1")
- if (NOT ${len_act} STREQUAL "0")
+ if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
@@ -181,7 +199,14 @@ if (NOT TEST_SKIP_COMPARE)
endif ()
endif ()
endforeach ()
- endif ()
+ else ()
+ if (${len_act} STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
+ endif ()
+ if (${len_ref} STREQUAL "0")
+ message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
+ endif ()
+ endif()
if (NOT ${len_act} STREQUAL ${len_ref})
set (TEST_RESULT 1)
endif ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index ecf3be0..3039cfd 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -237,16 +237,18 @@ macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_PLATFORM "${BINARY_PLATFORM} 10")
endif ()
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
- if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+ if (${CMAKE_C_COMPILER_VERSION} MATCHES "^16.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^15.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "18.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "19.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017")
else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
endif ()