summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils/decorators.py')
-rw-r--r--meta/lib/oeqa/utils/decorators.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 1e5a890fdd..61a1a739ea 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -10,12 +10,14 @@ import os
10import logging 10import logging
11import sys 11import sys
12import unittest 12import unittest
13import threading
13 14
14#get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame 15#get the "result" object from one of the upper frames provided that one of these upper frames is a unittest.case frame
15class getResults(object): 16class getResults(object):
16 def __init__(self): 17 def __init__(self):
17 #dynamically determine the unittest.case frame and use it to get the name of the test method 18 #dynamically determine the unittest.case frame and use it to get the name of the test method
18 upperf = sys._current_frames().values()[0] 19 ident = threading.current_thread().ident
20 upperf = sys._current_frames()[ident]
19 while (upperf.f_globals['__name__'] != 'unittest.case'): 21 while (upperf.f_globals['__name__'] != 'unittest.case'):
20 upperf = upperf.f_back 22 upperf = upperf.f_back
21 23