diff mbox series

[1/2] regression.py: fix AttributeError

Message ID 20241011021911.396047-1-changqing.li@windriver.com
State New
Headers show
Series [1/2] regression.py: fix AttributeError | expand

Commit Message

Changqing Li Oct. 11, 2024, 2:19 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

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'

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 scripts/lib/resulttool/regression.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
index 10e7d13841..204e6eecb7 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -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 '