Bug 10162

Summary: oe-selftest: When using xml reporting runqemu fails
Product: [QA/Testing] Build Testing Reporter: Mariano Lopez <mariano.lopez>
Component: generalAssignee: Mariano Lopez <mariano.lopez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: benjamin.esquivel, leonardo.sandoval.gonzalez, sgw
Version: unspecified   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=10826
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10866
Whiteboard:
OS type for building Yocto: --- Type of Regression: Unknown (Hard to categorize)
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 9954, 9997    

Description Mariano Lopez 2016-08-18 17:31:32 UTC
The module unittest-xml-reporting overwrites sys.stdout with an StringIO() object and when cooker is called it throws a traceback:

======================================================================
ERROR [18.025s]: test_testexport_basic (oeqa.selftest.runtime-test.TestExport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mlopezva/repo/poky/meta/lib/oeqa/selftest/runtime-test.py", line 34, in test_testexport_basic
    with runqemu('core-image-minimal') as qemu:
  File "/usr/lib64/python3.4/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/home/mlopezva/repo/poky/meta/lib/oeqa/utils/commands.py", line 217, in runqemu
    tinfoil = bb.tinfoil.Tinfoil()
  File "/home/mlopezva/repo/poky/bitbake/lib/bb/tinfoil.py", line 54, in __init__
    self.cooker = BBCooker(self.config, features)
  File "/home/mlopezva/repo/poky/bitbake/lib/bb/cooker.py", line 233, in __init__
    fd = sys.stdout.fileno()
io.UnsupportedOperation: fileno
Comment 1 Mariano Lopez 2016-08-24 16:02:16 UTC
Sent patch to mailing list:

http://lists.openembedded.org/pipermail/bitbake-devel/2016-August/007943.html
Comment 2 Leonardo Sandoval Gonzalez 2016-08-25 17:09:02 UTC
This is M+, this has to be ready for M3. Patch also sent to the ML
Comment 3 Mariano Lopez 2016-09-07 14:15:45 UTC
This has been solved with commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=355e4ec0b6ac20d5c66618e6df1db6064baceb57