unit: write out XML file

This writes out the results of the unit tests in an XML file called
lwip_unittests.xml in the same directory as the unittests executable.

See https://libcheck.github.io/check/doc/check_html/check_4.html#XML-Logging
for an example of the ouput. Of particular use is the duration field, for
each test and for the entire test run.
This commit is contained in:
Joel Cunningham 2018-03-04 02:38:55 -06:00
parent 53ddb9244b
commit b28e979739

View File

@ -86,6 +86,7 @@ int main(void)
#endif #endif
sr = srunner_create((suites[0])()); sr = srunner_create((suites[0])());
srunner_set_xml(sr, "lwip_unittests.xml");
for(i = 1; i < num; i++) { for(i = 1; i < num; i++) {
srunner_add_suite(sr, ((suite_getter_fn*)suites[i])()); srunner_add_suite(sr, ((suite_getter_fn*)suites[i])());
} }