mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
oeqa/core/decorator: remove redundant code
There's no need to wrap *tags in a potential list, as *tags will always be a tuple. (From OE-Core rev: 54210c518bcb76d80c8ec9564d1ddf344e9d8924) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b9df97f59c
commit
ccc03581f5
@@ -5,8 +5,7 @@
|
||||
#
|
||||
|
||||
from functools import wraps
|
||||
from abc import abstractmethod, ABCMeta
|
||||
from oeqa.core.utils.misc import strToList
|
||||
from abc import ABCMeta
|
||||
|
||||
decoratorClasses = set()
|
||||
|
||||
@@ -65,15 +64,11 @@ class OETestDiscover(OETestDecorator):
|
||||
return registry['cases']
|
||||
|
||||
def OETestTag(*tags):
|
||||
expandedtags = []
|
||||
for tag in tags:
|
||||
expandedtags += strToList(tag)
|
||||
def decorator(item):
|
||||
if hasattr(item, "__oeqa_testtags"):
|
||||
# do not append, create a new list (to handle classes with inheritance)
|
||||
item.__oeqa_testtags = list(item.__oeqa_testtags) + expandedtags
|
||||
item.__oeqa_testtags = list(item.__oeqa_testtags) + list(tags)
|
||||
else:
|
||||
item.__oeqa_testtags = expandedtags
|
||||
item.__oeqa_testtags = tags
|
||||
return item
|
||||
return decorator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user