| 1 |
file(GLOB test_xml_file "${RunCMake_TEST_BINARY_DIR}/Testing/*/Test.xml") |
| 2 |
if(test_xml_file) |
| 3 |
file(READ "${test_xml_file}" test_xml LIMIT 4096) |
| 4 |
if("${test_xml}" MATCHES [[(<Test Status="passed">.*</Test>)]]) |
| 5 |
set(test_result "${CMAKE_MATCH_1}") |
| 6 |
endif() |
| 7 |
if(NOT "${test_result}" MATCHES "<Value>.*${TRUNCATED_OUTPUT}.*</Value>") |
| 8 |
set(RunCMake_TEST_FAILED "Test output truncation failed:\n ${test_result}\nExpected: ${TRUNCATED_OUTPUT}") |
| 9 |
endif() |
| 10 |
else() |
| 11 |
set(RunCMake_TEST_FAILED "Test.xml not found") |
| 12 |
endif() |