Skip to content

Commit

Permalink
cmake: emu: qemu: Create pipe file before using
Browse files Browse the repository at this point in the history
For run_qemu and qemu_debugserver, the targets that use QEMU_PIPE,
ensure that the QEMU_PIPE file exists before passing the path to QEMU as
an argument.

Signed-off-by: Abe Levkoy <[email protected]>
  • Loading branch information
alevkoy authored and carlescufi committed Apr 4, 2023
1 parent 9f10881 commit c919096
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/emu/qemu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ if(QEMU_PTY)
elseif(QEMU_PIPE)
# Redirect console to a pipe, used for running automated tests.
list(APPEND QEMU_FLAGS -chardev pipe,id=con,mux=on,path=${QEMU_PIPE})
# Create the pipe file before passing the path to QEMU.
foreach(target ${qemu_targets})
list(APPEND PRE_QEMU_COMMANDS_FOR_${target} COMMAND ${CMAKE_COMMAND} -E touch ${QEMU_PIPE})
endforeach()
else()
# Redirect console to stdio, used for manual debugging.
list(APPEND QEMU_FLAGS -chardev stdio,id=con,mux=on)
Expand Down

0 comments on commit c919096

Please sign in to comment.