1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

oeqa/utils/decorators: Append the testname without the full path

When getting the failures/errors/skipped lists, include the
unit test without the full path.

This issue was found on this scenario

    | test_1_logrotate_setup (oeqa.runtime.logrotate.LogrotateTest) ... FAIL
    | test_2_logrotate (oeqa.runtime.logrotate.LogrotateTest) ... ok

Where test_1_logrotate failed and test_2_logrotate should not have
run because

    @skipUnlessPassed("test_1_logrotate_setup")
    def test_2_logrotate(self):

(From OE-Core rev: 8715beff7b910209627da3726b18b7abf801b557)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Leonardo Sandoval
2015-09-29 06:27:07 +00:00
committed by Richard Purdie
parent 8fe5b489df
commit ec504e0ff6
+4
View File
@@ -33,6 +33,10 @@ class getResults(object):
ret.append(s.replace("setUpModule (", "").replace(")",""))
else:
ret.append(s)
# Append also the test without the full path
testname = s.split('.')[-1]
if testname:
ret.append(testname)
return ret
self.faillist = handleList(upperf.f_locals['result'].failures)
self.errorlist = handleList(upperf.f_locals['result'].errors)