[svn-r27933] Cmake 3.3 allowed execute_process to merge output and error files if the filename or the variable were the same.

Changed instances to make the outpu_variable different.
This commit is contained in:
Allen Byrne
2015-10-02 12:55:08 -05:00
parent b9d27c0ed3
commit af5c2697a1
5 changed files with 42 additions and 42 deletions

View File

@@ -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")