Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41771 )
Change subject: tests: Allow emitting junit output for unit tests ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/41771/1/tests/Makefile.inc File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/41771/1/tests/Makefile.inc@140 PS1, Line 140: $(alltests): export CMOCKA_XML_FILE=$(testobj)/junit-$(subst /,_,$^).xml
That's nice. […]
Yes, it is.
https://review.coreboot.org/c/coreboot/+/41771/1/tests/Makefile.inc@144 PS1, Line 144: rm -f $(testobj)/junit-$(subst /,_,$^).xml
Hmm.. ok - I can answer my own question. […]
I think the main issue is stale xml files when removing or renaming tests. That's a temporary issue best solved with cleaning the tree manually (as is required for similar changes to source code elsewhere, too).
Adding special handling to what-jenkins-does means that this would surprise users running tests locally. For some twisted reason cmocka's semantics are to write to the file in CMOCKA_XML_FILE _only_ if the file doesn't exist yet and can be created. That's neat, I guess, for data preservation, but it's very unlike the behavior of most other tools.