[elbe-devel] [PATCH 4/4] test_xml: make newlines visible in failed test output

Bastian Germann bage at linutronix.de
Mon Mar 29 14:03:12 CEST 2021


Am 29.03.21 um 13:03 schrieb Torben Hohn:
> newlines in the xml output are ignored when the xml is made visible
> in jenkins. Replace \n with an xml entity (and \n).
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

Is this only printed in an HTML context?

Acked-by: Bastian Germann <bage at linutronix.de>

> ---
>   elbepack/tests/test_xml.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
> index 2b4881925..a080cf0b3 100644
> --- a/elbepack/tests/test_xml.py
> +++ b/elbepack/tests/test_xml.py
> @@ -14,7 +14,7 @@ from elbepack.shellhelper import command_out
>   def system(cmd, allow_fail=False):
>       ret, out = command_out(cmd)
>       if ret != 0 and not allow_fail:
> -        raise Exception(out)
> +        raise Exception(out.replace('\n', ' &#x0a;\n'))
>   
>   @unittest.skipIf(ElbeTestCase.level < ElbeTestLevel.INITVM,
>                    "Test level not set to INITVM")
> 


More information about the elbe-devel mailing list