From a6eb429d51473a8a2adbee4d41afcc7861a8a0a6 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Mon, 2 Jun 2025 15:04:39 +0200 Subject: [PATCH] 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 Reviewed-by: Andrew Cooper Acked-by: Stefano Stabellini --- automation/scripts/run-tools-tests | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests index 2bca1589db..18687f61a3 100755 --- a/automation/scripts/run-tools-tests +++ b/automation/scripts/run-tools-tests @@ -25,9 +25,10 @@ for f in "$1"/*; do echo "FAILED: $f" failed+=" $f" printf ' \n' "$f" "$ret" >> "$xml_out" - # TODO: could use xml escaping... but current tests seems to - # produce sane output + printf '> "$xml_out" + # TODO: Escape ']]>' if necessary cat /tmp/out >> "$xml_out" + printf ']]>\n' >> "$xml_out" printf ' \n' >> "$xml_out" else echo "PASSED"