diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-11-16 17:07:40 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-11-16 17:07:40 (GMT) |
commit | 1ab76b1117630d2c5cb503163287b7ba08e3d04d (patch) | |
tree | bb79b0c6bab6200e74cd64a89a8892312b22c703 /config/cmake/runTest.cmake | |
parent | ef26f71457a7c051de0428dc3d7db9d085fd8036 (diff) | |
download | hdf5-1ab76b1117630d2c5cb503163287b7ba08e3d04d.zip hdf5-1ab76b1117630d2c5cb503163287b7ba08e3d04d.tar.gz hdf5-1ab76b1117630d2c5cb503163287b7ba08e3d04d.tar.bz2 |
[svn-r19791] CMake: Correct Error tests. Add Deprecated Symbols option.
Tested: local linux
Diffstat (limited to 'config/cmake/runTest.cmake')
-rw-r--r-- | config/cmake/runTest.cmake | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index c9334c1..26acc39 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -28,6 +28,10 @@ SET (ERROR_APPEND 1) MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") +IF (TEST_ENV_VAR) + SET (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") +ENDIF (TEST_ENV_VAR) + # run the test program, capture the stdout/stderr and the result var EXECUTE_PROCESS ( COMMAND ${TEST_PROGRAM} ${TEST_ARGS} @@ -69,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}") @@ -86,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}") |