This diff adds a xunit directive that parses XML xUnit file. Such
file can be output of pytest if run with --junitxml=output.xml.
Unfortuntely xunitparser, python module that does all the parsing,
is not in repos and has to be installed via pip install xunitparser.
Details
- Reviewers
kparal tflink mkrizek jskladan - Maniphest Tasks
- T754: Find a Test Runner for Docker Images
- Commits
- rLTRN818c3c2fc015: Added a xunit directive
run with slightly modified example from D833
tests will follow
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
It looks good to me as a first pass, assuming that tests will be added.
I'd prefer to avoid having deps from pip only. python-xunit will need to be packaged in Fedora before this code lands since we're going to be packaging libtaskotron for Fedora shortly.
libtaskotron/directives/xunit_directive.py | ||
---|---|---|
23 | i think it'd be good to note where this path is relative to even if it may seem obvious | |
70 | I'm wondering if a default to allpass here might be better than requiring the arg |
libtaskotron/directives/xunit_directive.py | ||
---|---|---|
86 | With namespacing in mind, I suggest switching to this: checkname = "%s.%s" % (arg_data['checkname'], tc.methodname) this will make sure that these are semantically really subresults, and we'll be able to easily implement searches/filters, that would be at least clumsy with the need to know when to parse note to get the additional data. |
The only reason I hadn't accepted this yet is that the required python-xunitparser wasn't packaged yet. As soon as that goes stable, please get this merged into develop
i think it'd be good to note where this path is relative to even if it may seem obvious