Skip to content

Commit dbac4e6

Browse files
committed
test
1 parent e2ac7f7 commit dbac4e6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cmake/modules/RootTestDriver.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ if(CMD)
215215
else()
216216
execute_process(COMMAND ${_cmd} ${_out} ${_err} ${_cwd} RESULT_VARIABLE _rc)
217217

218+
# Helper: pretty-print the command
219+
function(print_command _label)
220+
message(STATUS "${_label}")
221+
foreach(arg IN LISTS _cmd _out _err _cwd)
222+
message(STATUS " [${arg}]")
223+
endforeach()
224+
endfunction()
225+
218226
if(_rc STREQUAL "Segmentation fault" OR _rc EQUAL 11)
219227
message(STATUS "Got ${_rc}, retrying again once more... with coredump enabled")
220228
string (REPLACE ";" " " _cmd_str "${_cmd}")
@@ -227,8 +235,10 @@ ${_cmd_str}
227235
endif()
228236

229237
if(DEFINED RC AND (NOT _rc EQUAL RC))
238+
print_command("Command failed:")
230239
message(FATAL_ERROR "error code: ${_rc}")
231240
elseif(NOT DEFINED RC AND _rc)
241+
print_command("Command failed:")
232242
message(FATAL_ERROR "error code: ${_rc}")
233243
endif()
234244
endif()

0 commit comments

Comments
 (0)