mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
GoogleTest: Improve gtest_discover_tests messages
Adjust the formatting of error messages produced when test discovery goes wrong, in order to avoid spurious line breaking.
This commit is contained in:
@@ -24,7 +24,8 @@ endfunction()
|
||||
# Run test executable to get list of available tests
|
||||
if(NOT EXISTS "${TEST_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
|
||||
"Specified test executable does not exist.\n"
|
||||
" Path: '${TEST_EXECUTABLE}'"
|
||||
)
|
||||
endif()
|
||||
execute_process(
|
||||
@@ -33,10 +34,13 @@ execute_process(
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if(NOT ${result} EQUAL 0)
|
||||
string(REPLACE "\n" "\n " output "${output}")
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
"Error running test executable.\n"
|
||||
" Path: '${TEST_EXECUTABLE}'\n"
|
||||
" Result: ${result}\n"
|
||||
" Output: ${output}\n"
|
||||
" Output:\n"
|
||||
" ${output}\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user