[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH 7/9] CI: Use CDATA avoid the need to escape tests outputs
From: Anthony PERARD <anthony.perard@xxxxxxxxxx> 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> --- automation/scripts/run-tools-tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests index 695ed77e46..852c1cfbcf 100755 --- a/automation/scripts/run-tools-tests +++ b/automation/scripts/run-tools-tests @@ -25,9 +25,9 @@ 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" cat /tmp/out >> "$xml_out" + printf ']]>' >> "$xml_out" printf ' </failure>\n' >> "$xml_out" else echo "PASSED" -- Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |