#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: Type: defect | Status: new Priority: minor | Milestone: Finger Food Component: core | Keywords: ----------------------+----------------------------------------------------- Test.py raise exception when unknown result keyword is used in PrettyLog.summary_detail dictionary:
{{{ Traceback (most recent call last): File "/usr/share/autotest/client/bin/parallel.py", line 18, in fork_start l() File "/usr/share/autotest/client/bin/job.py", line 522, in <lambda> l = lambda : test.runtest(self, url, tag, args, dargs) File "/usr/share/autotest/client/bin/test.py", line 115, in runtest job.sysinfo.log_after_each_iteration) File "/usr/share/autotest/client/common_lib/test.py", line 710, in runtest mytest._exec(args, dargs) File "/usr/share/autotest/client/common_lib/test.py", line 419, in _exec _call_test_function(self.execute, *p_args, **p_dargs) File "/usr/share/autotest/client/common_lib/test.py", line 630, in _call_test_function raise error.UnhandledTestFail(e) UnhandledTestFail: Unhandled ValueError: tuple.index(x): x not in tuple Traceback (most recent call last): File "/usr/share/autotest/client/common_lib/test.py", line 623, in _call_test_function return func(*args, **dargs) File "/usr/share/autotest/client/common_lib/test.py", line 291, in execute postprocess_profiled_run, args, dargs) File "/usr/share/autotest/client/common_lib/test.py", line 215, in _call_run_once self.postprocess_iteration() File "/usr/lib/python2.7/site-packages/autoqa/test.py", line 135, in postprocess_iteration self.post_results() File "/usr/lib/python2.7/site-packages/autoqa/test.py", line 183, in post_results logname = self._write_log(test_detail) File "/usr/lib/python2.7/site-packages/autoqa/test.py", line 313, in _write_log log.write(test_detail.create_output(full_log=full_log)) File "/usr/lib/python2.7/site-packages/autoqa/test.py", line 561, in create_output return self.log.create() File "/usr/lib/python2.7/site-packages/autoqa/pretty_log.py", line 245, in create summary_detail = self._make_summary_detail() File "/usr/lib/python2.7/site-packages/autoqa/pretty_log.py", line 87, in _make_summary_detail cmp=lambda x,y: td.cmp_result(x,y)) File "/usr/lib/python2.7/site-packages/autoqa/pretty_log.py", line 87, in <lambda> cmp=lambda x,y: td.cmp_result(x,y)) File "/usr/lib/python2.7/site-packages/autoqa/test.py", line 499, in cmp_result index1 = self.result_order.index(result1) if result1 is not None else -1 ValueError: tuple.index(x): x not in tuple }}}
Problem is in cmp_result() from test.py. It compares only results which are in result_order tuple. We can write some reasonable error message or we can rewrite cmp_result to handle this problem (then it is needed to check if it won't break something).
#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: pschindl Type: defect | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Changes (by pschindl):
* owner: => pschindl * status: new => assigned
#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: pschindl Type: defect | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Comment (by pschindl):
Patch is in reviewboard: https://fedorahosted.org/reviewboard/r/185/
#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: pschindl Type: defect | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Comment (by kparal):
Reviewed.
#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: pschindl Type: defect | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | ----------------------+----------------------------------------------------- Comment (by pschindl):
Patched updated.
#364: test.py: 'Unknown result keyword' handling in cmp_result() ----------------------+----------------------------------------------------- Reporter: pschindl | Owner: pschindl Type: defect | Status: closed Priority: minor | Milestone: 0.6.0 Component: core | Resolution: fixed Keywords: | ----------------------+----------------------------------------------------- Changes (by pschindl):
* status: assigned => closed * resolution: => fixed * milestone: Finger Food => 0.6.0
Comment:
Pushed to the master: a827c604334a124be4f7cc65d10d2eab85b5bb33
autoqa-devel@lists.fedorahosted.org