From c9190960a2b1f998cd28ec15502e9fa53ec8b5a3 Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Wed, 15 Mar 2023 11:16:42 -0600 Subject: [PATCH] cmake: emu: qemu: Create pipe file before using 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 --- cmake/emu/qemu.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/emu/qemu.cmake b/cmake/emu/qemu.cmake index 804760d557ee70..d95a7bb37179d7 100644 --- a/cmake/emu/qemu.cmake +++ b/cmake/emu/qemu.cmake @@ -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)