QtTestHelpers: print exit code upon failure

This might give a few insights into why the process has failed, at least
if distinct return values are used for different errors.

Change-Id: I61fe0ede812c4dda3d0cf0f2c96a479d198d340d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
Fabian Kosmale 2021-12-15 09:00:47 +01:00
parent f51d677948
commit 3ef6af024b

View File

@ -577,7 +577,7 @@ execute_process(COMMAND ${extra_runner} ${arg_COMMAND}
${post_run}
if(NOT result EQUAL 0)
string(JOIN \" \" full_command ${arg_COMMAND})
message(FATAL_ERROR \"\${full_command} execution failed.\")
message(FATAL_ERROR \"\${full_command} execution failed with exit code ${result}.\")
endif()"
)
endfunction()