diff options
| author | Ross Burton <ross@burtonini.com> | 2022-03-31 19:29:03 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-01 23:11:37 +0100 |
| commit | ccc03581f5dd401492defffc9527663ae1c47456 (patch) | |
| tree | 0e3abcd64b228397a6f6f992ef578f6aacb97238 /meta | |
| parent | b9df97f59c8369a01678e1851cabfedefffe2ea4 (diff) | |
| download | poky-ccc03581f5dd401492defffc9527663ae1c47456.tar.gz | |
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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oeqa/core/decorator/__init__.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/meta/lib/oeqa/core/decorator/__init__.py b/meta/lib/oeqa/core/decorator/__init__.py index 1a82518ab6..93efd30e1d 100644 --- a/meta/lib/oeqa/core/decorator/__init__.py +++ b/meta/lib/oeqa/core/decorator/__init__.py | |||
| @@ -5,8 +5,7 @@ | |||
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | from functools import wraps | 7 | from functools import wraps |
| 8 | from abc import abstractmethod, ABCMeta | 8 | from abc import ABCMeta |
| 9 | from oeqa.core.utils.misc import strToList | ||
| 10 | 9 | ||
| 11 | decoratorClasses = set() | 10 | decoratorClasses = set() |
| 12 | 11 | ||
| @@ -65,15 +64,11 @@ class OETestDiscover(OETestDecorator): | |||
| 65 | return registry['cases'] | 64 | return registry['cases'] |
| 66 | 65 | ||
| 67 | def OETestTag(*tags): | 66 | def OETestTag(*tags): |
| 68 | expandedtags = [] | ||
| 69 | for tag in tags: | ||
| 70 | expandedtags += strToList(tag) | ||
| 71 | def decorator(item): | 67 | def decorator(item): |
| 72 | if hasattr(item, "__oeqa_testtags"): | 68 | if hasattr(item, "__oeqa_testtags"): |
| 73 | # do not append, create a new list (to handle classes with inheritance) | 69 | # do not append, create a new list (to handle classes with inheritance) |
| 74 | item.__oeqa_testtags = list(item.__oeqa_testtags) + expandedtags | 70 | item.__oeqa_testtags = list(item.__oeqa_testtags) + list(tags) |
| 75 | else: | 71 | else: |
| 76 | item.__oeqa_testtags = expandedtags | 72 | item.__oeqa_testtags = tags |
| 77 | return item | 73 | return item |
| 78 | return decorator | 74 | return decorator |
| 79 | |||
