diff mbox series

[1/2] arm/lib: pass the PATH to fvp runner

Message ID 20230329120057.58949-1-peron.clem@gmail.com
State New
Headers show
Series [1/2] arm/lib: pass the PATH to fvp runner | expand

Commit Message

Clément Péron March 29, 2023, noon UTC
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 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jon Mason March 31, 2023, 3:01 a.m. UTC | #1
On Wed, Mar 29, 2023 at 02:00:56PM +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.
> 
> Signed-off-by: Cl�ment P�ron <peron.clem@gmail.com>

This patch doesn't apply cleanly to the master branch.  I think it's
as simple as appending to the list of variables passed to the
environment, but I'll leave it to you to confirm and test.

Thanks,
Jon

> ---
>  meta-arm/lib/fvp/runner.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
> index 28351a39..40ad1f3c 100644
> --- a/meta-arm/lib/fvp/runner.py
> +++ b/meta-arm/lib/fvp/runner.py
> @@ -63,7 +63,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'):
> +        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
>              if name in os.environ:
>                  env[name] = os.environ[name]
>  
> -- 
> 2.34.1
> 
>
Jon Mason March 31, 2023, 8:11 p.m. UTC | #2
On Thu, Mar 30, 2023 at 11:01:07PM -0400, Jon Mason wrote:
> On Wed, Mar 29, 2023 at 02:00:56PM +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.
> > 
> > Signed-off-by: Cl�ment P�ron <peron.clem@gmail.com>
> 
> This patch doesn't apply cleanly to the master branch.  I think it's
> as simple as appending to the list of variables passed to the
> environment, but I'll leave it to you to confirm and test.

I attempted to update but it fails selftest
Anyway, it might be a starting point for you
https://gitlab.com/jonmason00/meta-arm/-/commits/master-next2

> 
> Thanks,
> Jon
> 
> > ---
> >  meta-arm/lib/fvp/runner.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
> > index 28351a39..40ad1f3c 100644
> > --- a/meta-arm/lib/fvp/runner.py
> > +++ b/meta-arm/lib/fvp/runner.py
> > @@ -63,7 +63,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'):
> > +        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
> >              if name in os.environ:
> >                  env[name] = os.environ[name]
> >  
> > -- 
> > 2.34.1
> > 
> > 
>
Jon Mason May 25, 2023, 12:51 a.m. UTC | #3
On Wed, 29 Mar 2023 14:00:56 +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,
diff mbox series

Patch

diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
index 28351a39..40ad1f3c 100644
--- a/meta-arm/lib/fvp/runner.py
+++ b/meta-arm/lib/fvp/runner.py
@@ -63,7 +63,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'):
+        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
             if name in os.environ:
                 env[name] = os.environ[name]