diff options
author | Alexis Lothoré <alexis.lothore@bootlin.com> | 2023-02-28 19:10:52 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-12 23:39:13 +0000 |
commit | 1eae53e277b60347753f298e1cf3376c52a981ca (patch) | |
tree | 7ece9187dd78b5041d91331bd7bf1675afe16b12 /scripts/lib/resulttool/regression.py | |
parent | c31c140746c9ccf3183b8046a24ed040d5c94934 (diff) | |
download | poky-1eae53e277b60347753f298e1cf3376c52a981ca.tar.gz |
scripts/resulttool: do not count newly passing tests as regressions
resulttool regression module simply compare a base test status to a target test
result status. This approach raises many false positives since all XXX -> PASS
transitions (XXX being any status different from PASS) are flagged as
regression.
- Do not list XXX -> PASS transitions in regression report, instead count them
and print a summary of "newly passing tests"
- If an inspected pair has only "newly passing tests", do not print detailed
list and print it as "Improvement" instead of "Regression"
Updated output example looks like the following:
[...]
Improvement: oeselftest_fedora-37_qemux86-64_20230127010225
oeselftest_ubuntu-22.04_qemux86-64_20230226120516
(+1 test(s) passing)
[...]
Match: oeselftest_almalinux-8.7_qemuarm64_20230127015830
oeselftest_almalinux-8.7_qemuarm64_20230227015258
[...]
Regression: oeselftest_almalinux-9.1_qemumips_20230127000217
oeselftest_opensuseleap-15.4_qemumips_20230226130046
ptestresult.glibc-user.debug/tst-read-chk-cancel: PASS -> None
ptestresult.glibc-user.nptl/tst-mutexpi4: PASS -> FAIL
ptestresult.glibc-user.nptl/tst-mutexpi5a: PASS -> FAIL
Additionally, 44 previously failing test(s) is/are now passing
(From OE-Core rev: c335f96f687c73fde443ac330ca3e17113794d9e)
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/resulttool/regression.py')
-rw-r--r-- | scripts/lib/resulttool/regression.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py index d7f0b16ca9..1facbcd85e 100644 --- a/scripts/lib/resulttool/regression.py +++ b/scripts/lib/resulttool/regression.py | |||
@@ -190,11 +190,20 @@ def compare_result(logger, base_name, target_name, base_result, target_result): | |||
190 | else: | 190 | else: |
191 | logger.error('Failed to retrieved base test case status: %s' % k) | 191 | logger.error('Failed to retrieved base test case status: %s' % k) |
192 | if result: | 192 | if result: |
193 | resultstring = "Regression: %s\n %s\n" % (base_name, target_name) | 193 | new_pass_count = sum(test['target'] is not None and test['target'].startswith("PASS") for test in result.values()) |
194 | for k in sorted(result): | 194 | # Print a regression report only if at least one test has a regression status (FAIL, SKIPPED, absent...) |
195 | resultstring += ' %s: %s -> %s\n' % (k, result[k]['base'], result[k]['target']) | 195 | if new_pass_count < len(result): |
196 | resultstring = "Regression: %s\n %s\n" % (base_name, target_name) | ||
197 | for k in sorted(result): | ||
198 | if not result[k]['target'] or not result[k]['target'].startswith("PASS"): | ||
199 | resultstring += ' %s: %s -> %s\n' % (k, result[k]['base'], result[k]['target']) | ||
200 | if new_pass_count > 0: | ||
201 | resultstring += f' Additionally, {new_pass_count} previously failing test(s) is/are now passing\n' | ||
202 | else: | ||
203 | resultstring = "Improvement: %s\n %s\n (+%d test(s) passing)" % (base_name, target_name, new_pass_count) | ||
204 | result = None | ||
196 | else: | 205 | else: |
197 | resultstring = "Match: %s\n %s" % (base_name, target_name) | 206 | resultstring = "Match: %s\n %s" % (base_name, target_name) |
198 | return result, resultstring | 207 | return result, resultstring |
199 | 208 | ||
200 | def get_results(logger, source): | 209 | def get_results(logger, source): |
@@ -269,9 +278,9 @@ def regression_common(args, logger, base_results, target_results): | |||
269 | else: | 278 | else: |
270 | notfound.append("%s not found in target" % a) | 279 | notfound.append("%s not found in target" % a) |
271 | print("\n".join(sorted(matches))) | 280 | print("\n".join(sorted(matches))) |
281 | print("\n") | ||
272 | print("\n".join(sorted(regressions))) | 282 | print("\n".join(sorted(regressions))) |
273 | print("\n".join(sorted(notfound))) | 283 | print("\n".join(sorted(notfound))) |
274 | |||
275 | return 0 | 284 | return 0 |
276 | 285 | ||
277 | def regression_git(args, logger): | 286 | def regression_git(args, logger): |