From: "Theodore Ts'o" <tytso@mit.edu>
To: fstests@vger.kernel.org
Cc: "Darrick J. Wong" <djwong@kernel.org>, "Theodore Ts'o" <tytso@mit.edu>
Subject: [PATCH 1/2] test-appliance: edit out xmlns from the result.xml file
Date: Thu, 20 Apr 2023 12:08:36 -0400 [thread overview]
Message-ID: <20230420160837.1083228-2-tytso@mit.edu> (raw)
In-Reply-To: <20230420160837.1083228-1-tytso@mit.edu>
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(+)
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"
--
2.31.0
next prev parent reply other threads:[~2023-04-20 16:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 16:08 [PATCH 0/2] Work around various report.xml compatibility issues Theodore Ts'o
2023-04-20 16:08 ` Theodore Ts'o [this message]
2023-04-22 1:45 ` [PATCH 1/2] test-appliance: edit out xmlns from the result.xml file Darrick J. Wong
2023-04-20 16:08 ` [PATCH 2/2] test-appliance: support a timestamp specifier which contains a timezone Theodore Ts'o
2023-04-22 1:49 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2023-04-20 3:20 [PATCH 0/2] Work around various report.xml compatibility issues Theodore Ts'o
2023-04-20 3:20 ` [PATCH 1/2] test-appliance: edit out xmlns from the result.xml file Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420160837.1083228-2-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox