sahlberg/libiscsi — pull request #95 by jh86 (2014-03-11 23:29:30+00:00)
Title: Add XML output option to iscsi-test-cu

This adds an --xml option to make iscsi-test-cu produce machine-readable test results. This is especially useful for running libiscsi tests in a continuous integration setup. I have been testing with a similar form of this patch for a few weeks.

When run with this option, two files are written into the current working directory:
* CUnitAutomated-Listing.xml # list of what tests were run
* CUnitAutomated-Results.xml # actual test results

More information on CUnit's automated mode here: http://cunit.sourceforge.net/doc/running_tests.html#automated -- unfortunately, CU_automated_run_tests doesn't return anything so I made the final printf conditional depending on which mode you ran iscsi-test-cu in.

CUnit XML can be converted to JUnit to display test results in Jenkins using this script:
http://git.cyrusimap.org/cyrus-imapd/plain/cunit/cunit-to-junit.pl. I considered adding it into a 'contrib' dir, but wasn't sure if this would be accepted. The script is under a BSD license as far as I can tell.

Please let me know if I can do more (docs, code nitpicks) to get this patch merged. Thanks!