[honister,4/9] runfvp: don't hide output when using terminals

Message ID 20220426123359.22873-5-harry.moulton@arm.com
State New
Headers show
Series arm-bsp/machine: Backport runfvp config for Corstone1000 and update runfvp script | expand

Commit Message

harry.moulton@arm.com April 26, 2022, 12:33 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

Only pass a console_cb if we're hooking up a console, so that the output
from the FVP is visible on the terminal.

Signed-off-by: Ross Burton <ross.burton@arm.com>
 scripts/runfvp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


diff --git a/scripts/runfvp b/scripts/runfvp
index 877e80cb..77668248 100755
--- a/scripts/runfvp
+++ b/scripts/runfvp
@@ -216,7 +216,8 @@  def runfvp(cli_args):
         # When we can assume Py3.7+, this can simply be asyncio.run()
         loop = asyncio.get_event_loop()
-        loop.run_until_complete(asyncio.gather(start_fvp(cli, console_cb=console_started)))
+        console_cb = expected_terminal and console_started or None
+        loop.run_until_complete(asyncio.gather(start_fvp(cli, console_cb=console_cb)))
     except asyncio.CancelledError: