You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/CTestCommandLine/RequiredRegexNotFound-check...

17 lines
655 B

set(last_test_log "${RunCMake_TEST_BINARY_DIR}/Testing/Temporary/LastTest.log")
if(EXISTS "${last_test_log}")
file(READ "${last_test_log}" last_test_log_content)
string(REGEX REPLACE "\n+$" "" last_test_log_content "${last_test_log_content}")
if(NOT last_test_log_content MATCHES "
Test Pass Reason:
Required regular expression not found. Regex=[[]foo
toast1
bar
]")
string(REPLACE "\n" "\n " last_test_log_content " ${last_test_log_content}")
set(RunCMake_TEST_FAILED "LastTest.log does not have expected content:\n${last_test_log_content}")
endif()
else()
set(RunCMake_TEST_FAILED "LastTest.log missing:\n ${last_test_log}")
endif()