summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-08-02 16:17:17 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-04 11:44:25 +0100
commit9d22bfc9d0c4092dba1af0ee11a4c51b7b270786 (patch)
treeaf3d5b33bb688a938e01fd5b5d26a829a7856799 /scripts
parentb6abcd4f01aec24393bce68a9806d94702c0d387 (diff)
downloadopenembedded-core-9d22bfc9d0c4092dba1af0ee11a4c51b7b270786.tar.gz
scripts/resulttool: allow to replace test raw status with custom string
Add a STATUS_STRINGS dictionnary matching raw statuses to custom strings. Whenever a regression must be reported, raw status is searched in the custom statuses dict (key search is case insensitive). If no custom string is found, raw status is kept and used in regression report Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/resulttool/regression.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/lib/resulttool/regression.py b/scripts/lib/resulttool/regression.py
index f80a9182a9..3a23d7fc0a 100644
--- a/scripts/lib/resulttool/regression.py
+++ b/scripts/lib/resulttool/regression.py
@@ -74,6 +74,9 @@ OESELFTEST_METADATA_GUESS_TABLE={
}
}
+STATUS_STRINGS = {
+}
+
def test_has_at_least_one_matching_tag(test, tag_list):
return "oetags" in test and any(oetag in tag_list for oetag in test["oetags"])
@@ -173,6 +176,9 @@ def can_be_compared(logger, base, target):
return ret and metadata_matches(base_configuration, target_configuration) \
and machine_matches(base_configuration, target_configuration)
+def get_status_str(raw_status):
+ raw_status_lower = raw_status.lower() if raw_status else "None"
+ return STATUS_STRINGS.get(raw_status_lower, raw_status)
def compare_result(logger, base_name, target_name, base_result, target_result):
base_result = base_result.get('result')
@@ -205,7 +211,7 @@ def compare_result(logger, base_name, target_name, base_result, target_result):
resultstring = "Regression: %s\n %s\n" % (base_name, target_name)
for k in sorted(result):
if not result[k]['target'] or not result[k]['target'].startswith("PASS"):
- resultstring += ' %s: %s -> %s\n' % (k, result[k]['base'], result[k]['target'])
+ resultstring += ' %s: %s -> %s\n' % (k, get_status_str(result[k]['base']), get_status_str(result[k]['target']))
if new_pass_count > 0:
resultstring += f' Additionally, {new_pass_count} previously failing test(s) is/are now passing\n'
else: