* [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner
@ 2023-04-06 15:29 Clément Péron
2023-04-06 15:29 ` [PATCH v2 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Clément Péron @ 2023-04-06 15:29 UTC (permalink / raw)
To: meta-arm; +Cc: Clément Péron
When running an FVP machine the model executable need to be found
in the PATH environement.
At the moment the script doesn't provide any PATH to the subprocess.
Add PATH to the allowed environement variable to be forwaded.
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
meta-arm/lib/fvp/runner.py | 2 +-
meta-arm/lib/oeqa/selftest/cases/runfvp.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
index c52cdc1c..d957e780 100644
--- a/meta-arm/lib/fvp/runner.py
+++ b/meta-arm/lib/fvp/runner.py
@@ -91,7 +91,7 @@ class FVPRunner:
# Pass through environment variables needed for GUI applications, such
# as xterm, to work.
env = config['env']
- for name in ('DISPLAY', 'WAYLAND_DISPLAY', 'XAUTHORITY'):
+ for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY', 'XAUTHORITY'):
if name in os.environ:
env[name] = os.environ[name]
diff --git a/meta-arm/lib/oeqa/selftest/cases/runfvp.py b/meta-arm/lib/oeqa/selftest/cases/runfvp.py
index 5cc8660f..7e0d7808 100644
--- a/meta-arm/lib/oeqa/selftest/cases/runfvp.py
+++ b/meta-arm/lib/oeqa/selftest/cases/runfvp.py
@@ -108,7 +108,7 @@ class RunnerTests(OESelftestTestCase):
stderr=unittest.mock.ANY,
env={"FOO":"BAR"})
- @unittest.mock.patch.dict(os.environ, {"DISPLAY": ":42", "WAYLAND_DISPLAY": "wayland-42"})
+ @unittest.mock.patch.dict(os.environ, {"DISPLAY": ":42", "WAYLAND_DISPLAY": "wayland-42", "PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"})
def test_env_passthrough(self):
from fvp import runner
with self.create_mock() as m:
@@ -128,4 +128,4 @@ class RunnerTests(OESelftestTestCase):
stdin=unittest.mock.ANY,
stdout=unittest.mock.ANY,
stderr=unittest.mock.ANY,
- env={"DISPLAY":":42", "FOO": "BAR", "WAYLAND_DISPLAY": "wayland-42"})
+ env={"DISPLAY":":42", "FOO": "BAR", "WAYLAND_DISPLAY": "wayland-42", "PATH": "/path-42:/usr/sbin:/usr/bin:/sbin:/bin"})
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
2023-04-06 15:29 [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
@ 2023-04-06 15:29 ` Clément Péron
[not found] ` <1753621D8383E1DE.3977@lists.yoctoproject.org>
2023-05-25 0:51 ` [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
2 siblings, 0 replies; 4+ messages in thread
From: Clément Péron @ 2023-04-06 15:29 UTC (permalink / raw)
To: meta-arm; +Cc: Clément Péron
We access the dictionnary element that doesn't exist.
Use the get() method instead that will default the element to None if it
doesn't exist.
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
scripts/runfvp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/runfvp b/scripts/runfvp
index 939352b5..bfd60d71 100755
--- a/scripts/runfvp
+++ b/scripts/runfvp
@@ -55,8 +55,9 @@ def start_fvp(args, config, extra_args):
fvp.start(config, extra_args, args.terminals)
if args.console:
- expected_terminal = config["consoles"]["default"]
- if not expected_terminal:
+ fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
+ expected_terminal = config["consoles"].get("default")
+ if expected_terminal is None:
logger.error("--console used but FVP_CONSOLE not set in machine configuration")
return 1
port_stdout, log_stdout = itertools.tee(fvp.stdout, 2)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-arm] [PATCH v2 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
[not found] ` <1753621D8383E1DE.3977@lists.yoctoproject.org>
@ 2023-04-08 8:13 ` Clément Péron
0 siblings, 0 replies; 4+ messages in thread
From: Clément Péron @ 2023-04-08 8:13 UTC (permalink / raw)
To: peron.clem; +Cc: meta-arm
Hi,
On Thu, 6 Apr 2023 at 17:29, Clément Péron via lists.yoctoproject.org
<peron.clem=gmail.com@lists.yoctoproject.org> wrote:
>
> We access the dictionnary element that doesn't exist.
>
> Use the get() method instead that will default the element to None if it
> doesn't exist.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
> scripts/runfvp | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/runfvp b/scripts/runfvp
> index 939352b5..bfd60d71 100755
> --- a/scripts/runfvp
> +++ b/scripts/runfvp
> @@ -55,8 +55,9 @@ def start_fvp(args, config, extra_args):
> fvp.start(config, extra_args, args.terminals)
>
> if args.console:
> - expected_terminal = config["consoles"]["default"]
> - if not expected_terminal:
> + fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
Not sure where this line comes from, surely badly introduced during
the rebase :/
I have sent a v3
Clement
> + expected_terminal = config["consoles"].get("default")
> + if expected_terminal is None:
> logger.error("--console used but FVP_CONSOLE not set in machine configuration")
> return 1
> port_stdout, log_stdout = itertools.tee(fvp.stdout, 2)
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#4561): https://lists.yoctoproject.org/g/meta-arm/message/4561
> Mute This Topic: https://lists.yoctoproject.org/mt/98107299/4240582
> Group Owner: meta-arm+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [peron.clem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner
2023-04-06 15:29 [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
2023-04-06 15:29 ` [PATCH v2 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
[not found] ` <1753621D8383E1DE.3977@lists.yoctoproject.org>
@ 2023-05-25 0:51 ` Jon Mason
2 siblings, 0 replies; 4+ messages in thread
From: Jon Mason @ 2023-05-25 0:51 UTC (permalink / raw)
To: meta-arm, Clément Péron
On Thu, 6 Apr 2023 17:29:07 +0200, Clément Péron wrote:
> When running an FVP machine the model executable need to be found
> in the PATH environement.
>
> At the moment the script doesn't provide any PATH to the subprocess.
>
> Add PATH to the allowed environement variable to be forwaded.
Applied, thanks!
[1/2] arm/lib: pass the PATH to fvp runner
commit: fa598021fb387e98bdb80861f245cc15acde4ca5
[2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
commit: 316e02c0f13b473e916cd779e59f0d55d48e4962
Best regards,
--
Jon Mason <jon.mason@arm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-25 0:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 15:29 [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
2023-04-06 15:29 ` [PATCH v2 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
[not found] ` <1753621D8383E1DE.3977@lists.yoctoproject.org>
2023-04-08 8:13 ` [meta-arm] " Clément Péron
2023-05-25 0:51 ` [PATCH v2 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.