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:
Anthony PERARD committed 2025-06-06 12:04:05 +02:00
1 parent ddf34d4bb8
commit a6eb429d51
1 file changed
+3 -2
+3 -2
View File
@@ -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"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.