diff options
Diffstat (limited to 'scripts/lib/resulttool/regression.py')
-rw-r--r-- | scripts/lib/resulttool/regression.py | 8 |
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={ | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | STATUS_STRINGS = { | ||
78 | } | ||
79 | |||
77 | def test_has_at_least_one_matching_tag(test, tag_list): | 80 | def test_has_at_least_one_matching_tag(test, tag_list): |
78 | return "oetags" in test and any(oetag in tag_list for oetag in test["oetags"]) | 81 | return "oetags" in test and any(oetag in tag_list for oetag in test["oetags"]) |
79 | 82 | ||
@@ -173,6 +176,9 @@ def can_be_compared(logger, base, target): | |||
173 | return ret and metadata_matches(base_configuration, target_configuration) \ | 176 | return ret and metadata_matches(base_configuration, target_configuration) \ |
174 | and machine_matches(base_configuration, target_configuration) | 177 | and machine_matches(base_configuration, target_configuration) |
175 | 178 | ||
179 | def get_status_str(raw_status): | ||
180 | raw_status_lower = raw_status.lower() if raw_status else "None" | ||
181 | return STATUS_STRINGS.get(raw_status_lower, raw_status) | ||
176 | 182 | ||
177 | def compare_result(logger, base_name, target_name, base_result, target_result): | 183 | def compare_result(logger, base_name, target_name, base_result, target_result): |
178 | base_result = base_result.get('result') | 184 | base_result = base_result.get('result') |
@@ -205,7 +211,7 @@ def compare_result(logger, base_name, target_name, base_result, target_result): | |||
205 | resultstring = "Regression: %s\n %s\n" % (base_name, target_name) | 211 | resultstring = "Regression: %s\n %s\n" % (base_name, target_name) |
206 | for k in sorted(result): | 212 | for k in sorted(result): |
207 | if not result[k]['target'] or not result[k]['target'].startswith("PASS"): | 213 | if not result[k]['target'] or not result[k]['target'].startswith("PASS"): |
208 | resultstring += ' %s: %s -> %s\n' % (k, result[k]['base'], result[k]['target']) | 214 | resultstring += ' %s: %s -> %s\n' % (k, get_status_str(result[k]['base']), get_status_str(result[k]['target'])) |
209 | if new_pass_count > 0: | 215 | if new_pass_count > 0: |
210 | resultstring += f' Additionally, {new_pass_count} previously failing test(s) is/are now passing\n' | 216 | resultstring += f' Additionally, {new_pass_count} previously failing test(s) is/are now passing\n' |
211 | else: | 217 | else: |