From aebeab87ea3e10f2782c95868a6a4227360623c2 Mon Sep 17 00:00:00 2001 From: Diogo Costa Date: Mon, 15 Apr 2024 13:55:41 +0100 Subject: [PATCH] feat(framework): add qemu launch failure logging Signed-off-by: Diogo Costa --- framework/test_framework.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/test_framework.py b/framework/test_framework.py index 23a5fdd..b4ea620 100644 --- a/framework/test_framework.py +++ b/framework/test_framework.py @@ -154,6 +154,11 @@ def deploy_test(platform): # from the initial ports; this retrieves the pts ports opened by QEMU while final_pts_ports == initial_pts_ports: final_pts_ports = connection.scan_pts_ports() + if process.poll(): + print(cons.RED_TEXT + + f"Error launching QEMU (exited with code {process.returncode})" + + cons.RESET_COLOR) + sys.exit(-1) # Find the difference between the initial and final pts ports diff_ports = connection.diff_ports(initial_pts_ports, final_pts_ports)