mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
CI: Use CDATA avoid the need to escape tests outputs
This is easier than escaping individual characters, especially '&' and '<' which are problematic if present. We might still need to escape ']]>' if this string is present in the test output, but hopefully not. Signed-off-by: Anthony PERARD <anthony.perard@vates.tech> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
ddf34d4bb8
commit
a6eb429d51
1 file changed
+3
-2
@@ -25,9 +25,10 @@ for f in "$1"/*; do
|
||||
echo "FAILED: $f"
|
||||
failed+=" $f"
|
||||
printf ' <failure type="failure" message="binary %s exited with code %d">\n' "$f" "$ret" >> "$xml_out"
|
||||
# TODO: could use xml escaping... but current tests seems to
|
||||
# produce sane output
|
||||
printf '<![CDATA[' >> "$xml_out"
|
||||
# TODO: Escape ']]>' if necessary
|
||||
cat /tmp/out >> "$xml_out"
|
||||
printf ']]>\n' >> "$xml_out"
|
||||
printf ' </failure>\n' >> "$xml_out"
|
||||
else
|
||||
echo "PASSED"
|
||||
|
||||