| 1 |
file(GLOB junit_xml_file "${RunCMake_TEST_BINARY_DIR}/junit.xml") |
| 2 |
if(junit_xml_file) |
| 3 |
file(READ "${junit_xml_file}" junit_xml LIMIT 4096) |
| 4 |
if(NOT "${junit_xml}" MATCHES "tests=\"5\"") |
| 5 |
set(RunCMake_TEST_FAILED "tests=\"5\" not found when expected") |
| 6 |
endif() |
| 7 |
if(NOT "${junit_xml}" MATCHES "failures=\"1\"") |
| 8 |
set(RunCMake_TEST_FAILED "failures=\"1\" not found when expected") |
| 9 |
endif() |
| 10 |
if(NOT "${junit_xml}" MATCHES "disabled=\"1\"") |
| 11 |
set(RunCMake_TEST_FAILED "disabled=\"1\" not found when expected") |
| 12 |
endif() |
| 13 |
if(NOT "${junit_xml}" MATCHES "skipped=\"2\"") |
| 14 |
set(RunCMake_TEST_FAILED "skipped=\"2\" not found when expected") |
| 15 |
endif() |
| 16 |
if(NOT "${junit_xml}" MATCHES "<system-out>hello world") |
| 17 |
set(RunCMake_TEST_FAILED "<system-out>hello world not found when expected") |
| 18 |
endif() |
| 19 |
if(NOT "${junit_xml}" MATCHES "<system-out>Disabled") |
| 20 |
set(RunCMake_TEST_FAILED "<system-out>Disabled not found when expected") |
| 21 |
endif() |
| 22 |
if(NOT "${junit_xml}" MATCHES "<skipped message=\"Unable to find executable\"/>") |
| 23 |
set(RunCMake_TEST_FAILED "<skipped message=\"Unable to find executable\"/> not found when expected") |
| 24 |
endif() |
| 25 |
if(NOT "${junit_xml}" MATCHES "<system-out>Unable to find executable:") |
| 26 |
set(RunCMake_TEST_FAILED "<system-out>Unable to find executable: not found when expected") |
| 27 |
endif() |
| 28 |
if(NOT "${junit_xml}" MATCHES "<skipped message=\"SKIP_REGULAR_EXPRESSION_MATCHED\"/>") |
| 29 |
set(RunCMake_TEST_FAILED "<skipped message=\"SKIP_REGULAR_EXPRESSION_MATCHED\"/> not found when expected") |
| 30 |
endif() |
| 31 |
if(NOT "${junit_xml}" MATCHES "<system-out>please skip") |
| 32 |
set(RunCMake_TEST_FAILED "<system-out>please skip not found when expected") |
| 33 |
endif() |
| 34 |
else() |
| 35 |
set(RunCMake_TEST_FAILED "junit.xml not found") |
| 36 |
endif() |