add --junit-tag
What
This MR adds the --junit-tag command-line option. It allows to add test tags as properties in JUnit reports.
Why
For instance, in Octez, we send JUnit reports to DataDog. Then, in DataDog, we can list the slowest tests. If they are too slow, we tag them as slow to move them to different pipelines. Then we don't want to see those slow tests in the list of slowest tests. The JUnit property thus allows to filter out those tests.
How
Since DataDog expects properties named dd_tags[NAME], we let the user specify the name of the property, just like we did with --junit-mem-peak.
Manually testing the MR
dune exec test/unix/main.exe -- --junit junit.xml --junit-tag 'dd_tags[check]=check' --junit-tag 'dd_tags[tsl]=tsl' --junit-mem-peak 'dd_tags[memory.peak]' --record-mem-peak --mem-poll-frequency 10000 -j 2
less junit.xml
Checklist
-
Update CHANGES.md. No need to document changes to documentation and tests. -
Make sure all new values, types etc. are documented in .mlifiles and that the generated documentation looks ok. -
Add tests in test/, if relevant.