Skip to content

Commit

Permalink
Output stderr file in CMake testing on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed Aug 25, 2023
1 parent 1d79445 commit a71e987
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 a71e987

Please sign in to comment.