From ed691a5335a1985a02898d62344aef847f7f0d9e Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Mon, 11 Dec 2017 17:41:25 +0000 Subject: [PATCH] framework/target: add shell_prompt target param. Add a Parameter to specify a regex that matches the shell prompt on the target. This used in establishing serial tty connections (e.g. VExpress UART). --- wa/framework/target/descriptor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index ef2a5e02..55a11d57 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -5,13 +5,14 @@ from devlib import (LinuxTarget, AndroidTarget, LocalLinuxTarget, Platform, Juno, TC2, Gem5SimulationPlatform, AdbConnection, SshConnection, LocalConnection, Gem5Connection) +from devlib.target import DEFAULT_SHELL_PROMPT from wa.framework import pluginloader from wa.framework.configuration.core import get_config_point_map from wa.framework.exception import PluginLoaderError from wa.framework.plugin import Plugin, Parameter from wa.framework.target.assistant import LinuxAssistant, AndroidAssistant -from wa.utils.types import list_of_strings, list_of_ints +from wa.utils.types import list_of_strings, list_of_ints, regex from wa.utils.misc import isiterable @@ -166,6 +167,10 @@ COMMON_TARGET_PARAMS = [ unrooted and cpufreq is not accessible to unprivileged users), or if ``Target`` initialization is taking too long for your platform. '''), + Parameter('shell_prompt', kind=regex, default=DEFAULT_SHELL_PROMPT, + description=''' + A regex that matches the shell prompt on the target. + '''), ] COMMON_PLATFORM_PARAMS = [