diff options
-rw-r--r-- | config/cmake/userblockTest.cmake | 8 | ||||
-rw-r--r-- | config/cmake/vfdTest.cmake | 4 | ||||
-rw-r--r-- | config/cmake_ext_mod/grepTest.cmake | 10 | ||||
-rw-r--r-- | config/cmake_ext_mod/prunTest.cmake | 30 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 32 |
5 files changed, 42 insertions, 42 deletions
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index fab470c..0775cbe 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -48,7 +48,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}.len.txt - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) if (NOT ${TEST_RESULT} STREQUAL "0") @@ -66,7 +66,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}-ub.cmp - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -84,7 +84,7 @@ if (TEST_CHECKUB STREQUAL "YES") WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_HFILE}.cmp - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -107,7 +107,7 @@ else (TEST_CHECKUB STREQUAL "YES") COMMAND ${TEST_PROGRAM} ${TEST_HFILE} WORKING_DIRECTORY ${TEST_FOLDER} RESULT_VARIABLE TEST_H_STRING_LEN - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) if (NOT TEST_H_STRING_LEN STREQUAL "0") diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index d3cb87e..4685d88 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -29,7 +29,7 @@ EXECUTE_PROCESS ( WORKING_DIRECTORY ${TEST_FOLDER} OUTPUT_FILE ${TEST_OUTPUT}_${TEST_VFD}.out ERROR_FILE ${TEST_OUTPUT}_${TEST_VFD}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -37,7 +37,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") endif (ERROR_APPEND) # if the return value is !=${TEST_EXPECT} bail out diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 5f07134..a090057 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -33,7 +33,7 @@ execute_process ( RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -44,16 +44,16 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}") file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) # TEST_REFERENCE should always be matched -string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) -string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) +string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) +string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT) if (${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") endif (${TEST_RESULT} STREQUAL "0") -string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) +string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) if (${TEST_EXPECT} STREQUAL "1") # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match - string (LENGTH "${TEST_MATCH}" TEST_RESULT) + string (LENGTH "${TEST_MATCH}" TEST_RESULT) if (NOT ${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") endif (NOT ${TEST_RESULT} STREQUAL "0") diff --git a/config/cmake_ext_mod/prunTest.cmake b/config/cmake_ext_mod/prunTest.cmake index 3d5ec31..089c203 100644 --- a/config/cmake_ext_mod/prunTest.cmake +++ b/config/cmake_ext_mod/prunTest.cmake @@ -30,7 +30,7 @@ set (ERROR_APPEND 1) message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_ENV_VAR) - set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") endif (TEST_ENV_VAR) # run the test program, capture the stdout/stderr and the result var @@ -40,7 +40,7 @@ EXECUTE_PROCESS ( RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) @@ -51,49 +51,49 @@ file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") endif (TEST_APPEND) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_ERROR) if (TEST_FILTER) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) #if (TEST_REF_FILTER) # message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") # file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) -# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") +# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") # file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") #endif (TEST_REF_FILTER) diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index bfaae2b..6506183 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -32,7 +32,7 @@ endif (NOT TEST_ERRREF) message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_ENV_VAR) - set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") endif (TEST_ENV_VAR) if (NOT TEST_INPUT) @@ -43,7 +43,7 @@ if (NOT TEST_INPUT) RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) else (NOT TEST_INPUT) @@ -55,7 +55,7 @@ else (NOT TEST_INPUT) INPUT_FILE ${TEST_INPUT} OUTPUT_FILE ${TEST_OUTPUT} ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_ERROR + OUTPUT_VARIABLE TEST_OUT ERROR_VARIABLE TEST_ERROR ) endif (NOT TEST_INPUT) @@ -64,11 +64,11 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (ERROR_APPEND) if (TEST_APPEND) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") endif (TEST_APPEND) # if the return value is !=${TEST_EXPECT} bail out @@ -80,13 +80,13 @@ message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) @@ -96,13 +96,13 @@ if (TEST_MASK_ERROR) else (NOT TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif (NOT TEST_ERRREF) - STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") if (NOT TEST_ERRREF) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") else (NOT TEST_ERRREF) @@ -112,7 +112,7 @@ endif (TEST_MASK_ERROR) if (TEST_FILTER) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) @@ -157,7 +157,7 @@ if (NOT TEST_SKIP_COMPARE) if (NOT ${TEST_RESULT} STREQUAL 0) message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") endif (NOT ${TEST_RESULT} STREQUAL 0) - + if (TEST_ERRREF) if (WIN32 AND NOT MINGW) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) |