[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] CI: Use CDATA avoid the need to escape tests outputs
commit a6eb429d51473a8a2adbee4d41afcc7861a8a0a6 Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Mon Jun 2 15:04:39 2025 +0200 Commit: Anthony PERARD <anthony.perard@xxxxxxxxxx> CommitDate: Fri Jun 6 12:04:05 2025 +0200 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@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- 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 ' <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" -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |