From 721bec250d5c0430591455350c02108769ba095a Mon Sep 17 00:00:00 2001 From: Peter Hoyes Date: Tue, 15 Nov 2022 15:01:12 +0000 Subject: [PATCH] arm/fvp: Join cli arguments in verbose logging It is sometimes helpful to copy and paste the cli arguments from the verbose runfvp output (e.g. to test with a development FVP build), but currently the arguments are printed as a Python list. Use shlex.join(cli) to safely join the arguments together in form that can be reused directly in a shell. Issue-Id: SCM-5314 Signed-off-by: Peter Hoyes Change-Id: Ibb5c5ed45d02e241cb3858f68740fb9d4e89357a Signed-off-by: Jon Mason --- meta-arm/lib/fvp/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py index 28351a39..f5c61f8b 100644 --- a/meta-arm/lib/fvp/runner.py +++ b/meta-arm/lib/fvp/runner.py @@ -2,6 +2,7 @@ import asyncio import re import subprocess import os +import shlex import shutil import sys @@ -67,7 +68,7 @@ class FVPRunner: if name in os.environ: env[name] = os.environ[name] - self._logger.debug(f"Constructed FVP call: {cli}") + self._logger.debug(f"Constructed FVP call: {shlex.join(cli)}") self._fvp_process = await asyncio.create_subprocess_exec( *cli, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,