Skip to content

Commit

Permalink
Output stderr file in CMake testing on failure (#3431)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Aug 26, 2023
1 parent ee0737f commit df6f5d3
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 df6f5d3

Please sign in to comment.