[svn-r22522] Merge trunk revision 22520 cmake files and h5dump/h5diff and configure to branch

This commit is contained in:
Allen Byrne
2012-07-06 14:16:07 -05:00
parent 3fef275c89
commit 046f1d7b1f
75 changed files with 4495 additions and 1214 deletions

View File

@@ -43,18 +43,21 @@ MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}")
# now grep the output with the reference
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)
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})
IF (${TEST_EXPECT})
IF (${TEST_EXPECT} STREQUAL "1")
# TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
STRING(LENGTH "${TEST_MATCH}" TEST_RESULT)
IF (NOT ${TEST_RESULT} STREQUAL "0")
MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_REFERENCE}")
MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
ENDIF (NOT ${TEST_RESULT} STREQUAL "0")
ELSE (${TEST_EXPECT})
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")
ENDIF (${TEST_EXPECT})
ENDIF (${TEST_EXPECT} STREQUAL "0")
# everything went fine...
MESSAGE ("Passed: The output of ${TEST_PROGRAM} matched")