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

Torben Hohn torben.hohn at linutronix.de
Mon Mar 29 13:03:14 CEST 2021


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>
---
 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")
-- 
2.20.1



More information about the elbe-devel mailing list