summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-16 13:21:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-17 07:47:07 +0100
commitadd766a8f7602ae75c8d4e61cfb11b239e31739c (patch)
tree849bdc12219464062eff96a10c4c8f74f817f6fc /meta/lib
parent05656a5f39ae0fe8eaa312447ab0198cd5fdad2e (diff)
downloadpoky-add766a8f7602ae75c8d4e61cfb11b239e31739c.tar.gz
oeqa/utils/decorators: Drop getResults
Now there are no users of getResults, drop it. The code doesn't work with python 3.8 onwards and is pretty horrible with internal python knowledge. We don't need this. (From OE-Core rev: 058d00386f13c48e84081adc0504fc71a06c6529) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/decorators.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 9627b35303..ea90164e5e 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -16,43 +16,6 @@ import threading
16import signal 16import signal
17from functools import wraps 17from functools import wraps
18 18
19#get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame
20class getResults(object):
21 def __init__(self):
22 #dynamically determine the unittest.case frame and use it to get the name of the test method
23 ident = threading.current_thread().ident
24 upperf = sys._current_frames()[ident]
25 while (upperf.f_globals['__name__'] != 'unittest.case'):
26 upperf = upperf.f_back
27
28 def handleList(items):
29 ret = []
30 # items is a list of tuples, (test, failure) or (_ErrorHandler(), Exception())
31 for i in items:
32 s = i[0].id()
33 #Handle the _ErrorHolder objects from skipModule failures
34 if "setUpModule (" in s:
35 ret.append(s.replace("setUpModule (", "").replace(")",""))
36 else:
37 ret.append(s)
38 # Append also the test without the full path
39 testname = s.split('.')[-1]
40 if testname:
41 ret.append(testname)
42 return ret
43 self.faillist = handleList(upperf.f_locals['result'].failures)
44 self.errorlist = handleList(upperf.f_locals['result'].errors)
45 self.skiplist = handleList(upperf.f_locals['result'].skipped)
46
47 def getFailList(self):
48 return self.faillist
49
50 def getErrorList(self):
51 return self.errorlist
52
53 def getSkipList(self):
54 return self.skiplist
55
56class testcase(object): 19class testcase(object):
57 def __init__(self, test_case): 20 def __init__(self, test_case):
58 self.test_case = test_case 21 self.test_case = test_case