Bug 9682 - enable xml output in OeTest class for report consumers
Summary: enable xml output in OeTest class for report consumers
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.2 M2
Assignee: Benjamin Esquivel
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks: 9954
  Show dependency tree
 
Reported: 2016-05-27 22:06 UTC by Benjamin Esquivel
Modified: 2016-08-11 22:30 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
oe-selftest log with XML report generation (6.59 KB, text/plain)
2016-07-21 15:50 UTC, Benjamin Esquivel
no flags Details
oe-selftest log with XML report functionality but NO library installed (6.87 KB, text/plain)
2016-07-21 15:52 UTC, Benjamin Esquivel
no flags Details
xml sample output (597 bytes, text/plain)
2016-07-21 19:19 UTC, Benjamin Esquivel
no flags Details
pre and post xmlrunner text output (556 bytes, text/plain)
2016-07-21 20:02 UTC, Benjamin Esquivel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Esquivel 2016-05-27 22:06:47 UTC
Report consumers usually take JUnit xml formatted output and the OeTest class is incapable of adding this support.

The fact that OeTest uses the TextTestRunner, which is a sample implementation, makes it incompatible with the xmlrunner as it is a very limited design.

A standard implementation of the unittest.main() instead of the TextTestRunner would easily allow to get the xml output. The proposal is to move away from the TextTestRunner in favor of unittest.main()
Comment 1 Benjamin Esquivel 2016-07-21 15:50:28 UTC
Created attachment 3302 [details]
oe-selftest log with XML report generation
Comment 2 Benjamin Esquivel 2016-07-21 15:52:39 UTC
Created attachment 3303 [details]
oe-selftest log with XML report functionality but NO library installed

The attachment shows how oe-selftest log defaults to the no XML results reporting when the module is not installed. Keeping the previous functionality intact.
Comment 3 Benjamin Esquivel 2016-07-21 19:19:12 UTC
Created attachment 3304 [details]
xml sample output

Attaching sample XML output of 3 bitbake tests
Comment 4 Benjamin Esquivel 2016-07-21 20:02:31 UTC
Created attachment 3305 [details]
pre and post xmlrunner text output

collateral changes in the text output of oe-selftest listed at the attachment. This will be addressed with a different bug so it can be proposed at the xmlrunner code.