Files
cmake/Tests/RunCMake/CTestCommandLine/output-junit-invalid-check.cmake
Tyler Yankee 0d320cb496 ctest: Exit nonzero when write to output JUnit or XML fails
`ProcessHandler` can return -1, 0, or 1, and the latter is used in this
particular case.

Fixes: #27949
2026-07-15 15:56:03 -04:00

7 lines
294 B
CMake

# Verify that CTest did not create our badly formed output file.
if(EXISTS "${RunCMake_TEST_BINARY_DIR}/not-a-dir/junit.xml" OR IS_DIRECTORY "${RunCMake_TEST_BINARY_DIR}/not-a-dir")
set(RunCMake_TEST_FAILED
"Found output junit ${RunCMake_TEST_BINARY_DIR}/not-a-dir/junit.xml"
)
endif()