Message ID | 20230420032056.789979-2-tytso@mit.edu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Work around various report.xml compatibility issues | expand |
diff --git a/test-appliance/files/root/runtests.sh b/test-appliance/files/root/runtests.sh index 9b32d287..c4ddb739 100755 --- a/test-appliance/files/root/runtests.sh +++ b/test-appliance/files/root/runtests.sh @@ -23,6 +23,7 @@ function copy_xunit_results() if test -f "$RESULT" then + sed -i.orig -e 's/xmlns=\".*\"//' "$RESULT" if test -f "$RESULTS" then merge_xunit "$RESULTS" "$RESULT"
Commit b76a6cdb40b5 ("report: derive an xml schema for the xunit report") in fstests upstream adds an xmlns attribute to the xunit <testcase/> tag. Unfortunately, this breaks the junitparser.py Python package, since it uses lxml Python package, and by adding an xmlns specifier, junitxml.py would need to know the schema and map that to namespace tag. So edit it out of the xml file using sed, which relies on the fact that fstests will add the xmlns file on a single line. The "right" way would be to use an XSLT processor, but that would bloat the test appliance significantly. So we'll just cheat for now while we discuss with fstests upstream whether adding the xmlns attribute is really worth the pain and incompatibility that it causes. Signed-off-by: Theodore Ts'o <tytso@mit.edu> --- test-appliance/files/root/runtests.sh | 1 + 1 file changed, 1 insertion(+)