summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-11-03 13:50:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-05 08:44:06 +0000
commit838b8e78dcaac783743c3a69f4f59a16759eb8a0 (patch)
tree3b5221523c9bf285b66e22760f3b5556989ccc11 /scripts
parentf6f2351b290648595a0ae6759cb233f31a340b61 (diff)
downloadpoky-838b8e78dcaac783743c3a69f4f59a16759eb8a0.tar.gz
scripts/resulttool: group all regressions in regression report
Commit c304fcbe0588b1078373558c2ddf36064bcdf214 introduced a grouping when listing regressions. This grouping has been added only for ptests. It has been observed that any other kind of tests could benefit from it. For example, current regression reports can show the following: 1 regression(s) for oescripts.OEGitproxyTests.test_oegitproxy_proxy_dash oescripts.OEGitproxyTests.test_oegitproxy_proxy_dash: PASSED -> SKIPPED 1 regression(s) for oescripts.OEPybootchartguyTests.test_pybootchartguy_help oescripts.OEPybootchartguyTests.test_pybootchartguy_help: PASSED -> SKIPPED 1 regression(s) for oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_pdf_output oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_pdf_output: PASSED -> SKIPPED 1 regression(s) for oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_png_output oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_png_output: PASSED -> SKIPPED 1 regression(s) for oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_svg_output oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_svg_output: PASSED -> SKIPPED [...] This output is not so useful in its current state and should be grouped per test type too. Enable grouping for all kind of tests, to make it llok like the following in reports: 5 regression(s) for oescripts oescripts.OEGitproxyTests.test_oegitproxy_proxy_dash: PASSED -> SKIPPED oescripts.OEPybootchartguyTests.test_pybootchartguy_help: PASSED -> SKIPPED oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_pdf_output: PASSED -> SKIPPED oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_png_output: PASSED -> SKIPPED oescripts.OEPybootchartguyTests.test_pybootchartguy_to_generate_build_svg_output: PASSED -> SKIPPED (From OE-Core rev: 982798ef96e3a32bf15341bdd3bb7c4356709412) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/resulttool/regression.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
index 8fbe5a5478..10e7d13841 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -236,7 +236,8 @@ def compare_result(logger, base_name, target_name, base_result, target_result, d
236 for k in sorted(result): 236 for k in sorted(result):
237 if not result[k]['target'] or not result[k]['target'].startswith("PASS"): 237 if not result[k]['target'] or not result[k]['target'].startswith("PASS"):
238 # Differentiate each ptest kind when listing regressions 238 # Differentiate each ptest kind when listing regressions
239 key = '.'.join(k.split('.')[:2]) if k.startswith('ptest') else k 239 key_parts = k.split('.')
240 key = '.'.join(key_parts[:2]) if k.startswith('ptest') else key_parts[0]
240 # Append new regression to corresponding test family 241 # Append new regression to corresponding test family
241 regressions[key] = regressions.setdefault(key, []) + [' %s: %s -> %s\n' % (k, get_status_str(result[k]['base']), get_status_str(result[k]['target']))] 242 regressions[key] = regressions.setdefault(key, []) + [' %s: %s -> %s\n' % (k, get_status_str(result[k]['base']), get_status_str(result[k]['target']))]
242 resultstring += f" Total: {sum([len(regressions[r]) for r in regressions])} new regression(s):\n" 243 resultstring += f" Total: {sum([len(regressions[r]) for r in regressions])} new regression(s):\n"