[PATCH v5 03/20] test: Pass stderr to stdout

neil.armstrong at linaro.org neil.armstrong at linaro.org
Thu Aug 29 16:22:48 CEST 2024


On 29/08/2024 00:08, Simon Glass wrote:
> Some tests may output things to stderr. Ensure that this output is not
> dropped, by redirecting it to stdout

Can't you make sure to output all labgrid output to stdout in the hook script instead ?

> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
> (no changes since v1)
> 
>   test/py/u_boot_spawn.py | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py
> index 97e95e07c80..81a09a9d639 100644
> --- a/test/py/u_boot_spawn.py
> +++ b/test/py/u_boot_spawn.py
> @@ -10,6 +10,7 @@ import re
>   import pty
>   import signal
>   import select
> +import sys
>   import time
>   import traceback
>   
> @@ -59,6 +60,7 @@ class Spawn:
>                   signal.signal(signal.SIGHUP, signal.SIG_DFL)
>                   if cwd:
>                       os.chdir(cwd)
> +                sys.stderr = sys.stdout
>                   os.execvp(args[0], args)
>               except:
>                   print('CHILD EXECEPTION:')



More information about the U-Boot mailing list