1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 23:41:08 +00:00

runfvp: check for telnet

Check for telnet on startup to avoid mysterious failures later when
telnet isn't available.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2022-03-31 19:31:12 +01:00
committed by Jon Mason
parent 1a7c48e5f6
commit 58f3251598

View File

@@ -5,6 +5,7 @@ import collections
import json
import os
import re
import shutil
import signal
import sys
import subprocess
@@ -42,7 +43,7 @@ class Terminals:
return config.get("RunFVP", "Terminal", fallback=None)
def preferred_terminal(self) -> str:
import shlex, shutil
import shlex
preferred = self.configured_terminal()
if preferred:
@@ -233,6 +234,11 @@ def runfvp(cli_args):
cli.extend(fvp_args)
logger.debug(f"Constructed FVP call: {cli}")
# Check that telnet is present
if not bool(shutil.which("telnet")):
logger.error("Cannot find telnet, this is needed to connect to the FVP.")
return 1
if args.console:
expected_terminal = config["console"]
if not expected_terminal: