summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestCommandLine/SkipRegexFound-check.cmake
blob: 1a2dfa353fcbfcd69062ab72f58817880a359b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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:
Skip regular expression found in output. Regex=[[]test1]")
    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()