]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/core/decorator: remove redundant code
authorRoss Burton <ross@burtonini.com>
Thu, 31 Mar 2022 18:29:03 +0000 (19:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Apr 2022 22:05:31 +0000 (23:05 +0100)
There's no need to wrap *tags in a potential list, as *tags will always
be a tuple.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/core/decorator/__init__.py

index 1a82518ab6a22c20b9f7a6b8956f7e7e21ab4b3c..93efd30e1dbd6f930e4dfcc1b6ed22d1207c1353 100644 (file)
@@ -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
-