regression.py: fix AttributeError
PATCH 1/2 regression.py: fix AttributeError
From: Changqing Li <[email protected]>
Fix following AttributeError when running "resulttool regression base target":
File "/yocto/poky/scripts/lib/resulttool/regression.py", line 322, in regression_common
res, resstr = compare_result(logger, c, b, base_results[a][c], target_results[a][b], args.limit)
AttributeError: 'Namespace' object has no attribute 'limit'
--- scripts/lib/resulttool/regression.py | 1 + 1 file changed, 1 insertion(+)
scripts/lib/resulttool/regression.py +1 -0
@@ -422,6 +422,7 @@ def register_commands(subparsers): help='(optional) filter the base results to this result ID') parser_build.add_argument('-t', '--target-result-id', default='', help='(optional) filter the target results to this result ID') + parser_build.add_argument('-l', '--limit', default=REGRESSIONS_DISPLAY_LIMIT, help="Maximum number of changes to display per test. Can be set to 0 to print all changes") parser_build = subparsers.add_parser('regression-git', help='regression git analysis', description='regression analysis comparing base result set to target '
Signature · 1 line
2.25.1
PATCH 2/2 regression.py: skip checking status for ptestresult.rawlogs/ptestresult.sections
From: Changqing Li <[email protected]>
ptestresult.rawlogs/ptestresult.sections don't have status is expected, so skip them to avoid following error when running "resulttool regression base target":
ERROR: Failed to retrieved base test case status: ptestresult.rawlogs
ERROR: Failed to retrieved base test case status: ptestresult.sections
--- scripts/lib/resulttool/regression.py | 2 ++ 1 file changed, 2 insertions(+)
scripts/lib/resulttool/regression.py +2 -0
@@ -212,6 +212,8 @@ def compare_result(logger, base_name, target_name, base_result, target_result, d if base_result and target_result: for k in base_result: + if k in ['ptestresult.rawlogs', 'ptestresult.sections']: + continue base_testcase = base_result[k] base_status = base_testcase.get('status') if base_status:
Signature · 1 line
2.25.1