diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/decorators.py | 4 |
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 | |||
10 | import logging | 10 | import logging |
11 | import sys | 11 | import sys |
12 | import unittest | 12 | import unittest |
13 | import 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 |
15 | class getResults(object): | 16 | class 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 | ||