Skip to content

Commit

Permalink
Output stderr file in CMake testing on failure (HDFGroup#3431)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored and qkoziol committed Sep 30, 2023
1 parent b00b632 commit ec87fe5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/cmake/runTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit ec87fe5

Please sign in to comment.