From df6f5d37d858a48f710d5a1d34eba875a657263e Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Sat, 26 Aug 2023 00:42:19 -0500 Subject: Output stderr file in CMake testing on failure (#3431) --- config/cmake/runTest.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 0d05424..1304d36 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -122,6 +122,10 @@ if (NOT TEST_RESULT EQUAL TEST_EXPECT) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) message (STATUS "Output :\n${TEST_STREAM}") endif () + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + message (STATUS "Error Output :\n${TEST_STREAM}") + endif () endif () message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") endif () -- cgit v0.12