Bug 8029

Summary: results-bitbake-worker.log is generated wrongly if there are same test method name
Product: [QA/Testing] Runtime Testing Reporter: dawei <daweix.wu>
Component: generalAssignee: Lucian Musat <georgex.l.musat>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, bogdanx.a.voiculescu, cathy.shen, corneliux.stoicescu, georgex.l.musat, junhuix.zhang
Version: 1.8.1   
Target Milestone: 1.9 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description dawei 2015-07-20 07:01:39 UTC
Details:

below is test script.

Test1.py:
==========================================
from oeqa.oetest import oeRuntimeTest

class Test1(oeRuntimeTest):
    def testf(self):
        assert False, "Test1 failed"

class Test2(oeRuntimeTest):
    def testf(self):
        print "Test2 pass"
==========================================


Steps:
1. bitbake <target> -c testimage

Expected Results:
One pass and one fail in log

Actual Results:
All pass in log
Comment 1 Lucian Musat 2015-09-07 08:57:33 UTC
Patch merged in commit 4925fa08e12bee41788c986ebc213bca4dc49c78.
Comment 2 Bogdan Alexandru Voiculescu 2015-09-17 08:32:42 UTC
verified on master: ea562de57590c966cd5a75fda8defecd397e6436
works as expected

NOTE: Logged as root in serial console
NOTE: Test modules  ['oeqa.runtime.ping', 'oeqa.runtime.Test1']
NOTE: Found 3 tests
test_ping (oeqa.runtime.ping.PingTest) ... ok
testf (oeqa.runtime.Test1.Test1) ... FAIL
testf dump data stored in /tmp/oe-saved-tests/201509171131_testf
testf (oeqa.runtime.Test1.Test2) ... Test2 pass
ok

======================================================================
FAIL: testf (oeqa.runtime.Test1.Test1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/valentin/yocto/poky/meta/lib/oeqa/runtime/Test1.py", line 5, in testf
    assert False, "Test1 failed"
AssertionError: Test1 failed

----------------------------------------------------------------------
Ran 3 tests in 3.587s

FAILED (failures=1)
NOTE: Stopping logging thread
NOTE: Stop event received
NOTE: Tearing down logging thread
NOTE: Sending SIGTERM to runqemu
DEBUG: Python function do_testimage finished