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 committed Aug 31, 2023
1 parent 4646ac8 commit 951c7dd
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 951c7dd

Please sign in to comment.