diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-11-16 16:38:40 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-11-16 16:38:40 (GMT) |
commit | 186d01285a70848570482c853d00c151323981fa (patch) | |
tree | 886a29ac6fb08d737e773e80b8386b5b16c5321f /config | |
parent | 7fd26f00b7826d36d8ec5681a17849bb17fd2cee (diff) | |
download | hdf5-186d01285a70848570482c853d00c151323981fa.zip hdf5-186d01285a70848570482c853d00c151323981fa.tar.gz hdf5-186d01285a70848570482c853d00c151323981fa.tar.bz2 |
[svn-r19790] CMake: Correct Error tests. Add Deprecated Symbols option.
Tested: local linux
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/grepTest.cmake | 2 | ||||
-rw-r--r-- | config/cmake/runTest.cmake | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index cc3a9b4..9b5148c 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -1,4 +1,4 @@ -# runTest.cmake executes a command and captures the output in a file. File is then compared +# grepTest.cmake executes a command and captures the output in a file. File is then compared # against a reference file. Exit status of command can also be compared. # arguments checking diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index e65e877..26acc39 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -73,6 +73,18 @@ IF (TEST_MASK_MOD) 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}") + 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}") @@ -90,10 +102,12 @@ EXECUTE_PROCESS ( RESULT_VARIABLE TEST_RESULT ) +MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}") + # again, if return value is !=0 scream and shout -IF (TEST_RESULT) +IF (NOT ${TEST_RESULT} STREQUAL 0) MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match ${TEST_REFERENCE}") -ENDIF (TEST_RESULT) +ENDIF (NOT ${TEST_RESULT} STREQUAL 0) # everything went fine... MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}") |