summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorBenjamin Esquivel <benjamin.esquivel@linux.intel.com>2017-02-12 19:00:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 20:06:41 -0800
commit476696030492b09a5985f948e38db8304cadd512 (patch)
tree079db41a7512d7e9acefdec1311324e2189d9842 /meta/lib/oeqa/utils
parentf4ba140c59793ddb5405fdf5da608c4959c68d96 (diff)
downloadpoky-476696030492b09a5985f948e38db8304cadd512.tar.gz
selftest: remove result file log awkward checking
because of the way that the test cases are looked in the results, the file logger is incompatible with extended implementations of the unittest runner. as the xml runner extends the unittest runner, it shares the id() method which returns the full name of the test, not only the test function name. With that, a single check of the full name reviews at the same time the class name as well as the function name. [YOCTO#11012] (From OE-Core rev: 19b025333846018fd3e4ee4ca5cc18d375fa6213) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r--meta/lib/oeqa/utils/decorators.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 25f9c54e6b..d876896921 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -172,18 +172,19 @@ def LogResults(original_class):
172 172
173 #check status of tests and record it 173 #check status of tests and record it
174 174
175 tcid = self.id()
175 for (name, msg) in result.errors: 176 for (name, msg) in result.errors:
176 if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]): 177 if tcid == name.id():
177 local_log.results("Testcase "+str(test_case)+": ERROR") 178 local_log.results("Testcase "+str(test_case)+": ERROR")
178 local_log.results("Testcase "+str(test_case)+":\n"+msg) 179 local_log.results("Testcase "+str(test_case)+":\n"+msg)
179 passed = False 180 passed = False
180 for (name, msg) in result.failures: 181 for (name, msg) in result.failures:
181 if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]): 182 if tcid == name.id():
182 local_log.results("Testcase "+str(test_case)+": FAILED") 183 local_log.results("Testcase "+str(test_case)+": FAILED")
183 local_log.results("Testcase "+str(test_case)+":\n"+msg) 184 local_log.results("Testcase "+str(test_case)+":\n"+msg)
184 passed = False 185 passed = False
185 for (name, msg) in result.skipped: 186 for (name, msg) in result.skipped:
186 if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]): 187 if tcid == name.id():
187 local_log.results("Testcase "+str(test_case)+": SKIPPED") 188 local_log.results("Testcase "+str(test_case)+": SKIPPED")
188 passed = False 189 passed = False
189 if passed: 190 if passed: