diff --git a/common/log_parser/scmi/json_to_html.py b/common/log_parser/scmi/json_to_html.py index 39c2e768..268c2672 100644 --- a/common/log_parser/scmi/json_to_html.py +++ b/common/log_parser/scmi/json_to_html.py @@ -100,6 +100,7 @@ def build_html(overall_summary, test_results, chart_b64, dest_html, suite_name, .result-summary h2{border-bottom:2px solid #27ae60;padding-bottom:10px;margin-bottom:20px;} .test-suite-header{font-size:22px;font-weight:bold;color:#34495e;margin-top:30px;} + .suite-reason{margin:8px 0 12px 0;font-size:15px;} .reason{text-align:center;} .waiver-reason{text-align:center;} @@ -130,6 +131,7 @@ def build_html(overall_summary, test_results, chart_b64, dest_html, suite_name,
{% for suite in test_results %}
Test Suite: {{ suite.Test_suite }}
+
Reason: {{ suite.reason | default('N/A') }}
diff --git a/common/log_parser/scmi/logs_to_json.py b/common/log_parser/scmi/logs_to_json.py index b32f4eb7..54dcd299 100644 --- a/common/log_parser/scmi/logs_to_json.py +++ b/common/log_parser/scmi/logs_to_json.py @@ -33,6 +33,7 @@ re.I, ) STATUS_LINE_RE = re.compile(r"^(.*?)\s*:\s*(CONFORMANT|NON CONFORMANT|SKIPPED)\s*$", re.I) +NO_ACCESS_RE = re.compile(r"Calling agent have no access to\s+(.*?)\s+protocol", re.I) # If this appears, treat SCMI as not runnable (no JSON/HTML). FATAL_SCMI_RE = re.compile(r"Failed to open SCMI raw transport base path", re.I) @@ -90,6 +91,7 @@ def ensure_suite(suite_name): if suite_name not in suites: suites[suite_name] = { "Test_suite": suite_name, + "reason": "N/A", "testcases": [], "test_suite_summary": init_summary(), } @@ -148,6 +150,21 @@ def start_new_run(): current_details = [] continue + # Special case: protocol not accessible for this platform. + no_access = NO_ACCESS_RE.search(line) + if no_access: + protocol = no_access.group(1).strip() + suite_for_reason = current_suite or protocol + ensure_suite(suite_for_reason) + suite_key = suite_for_reason.lower() + suite_entry = suites[suite_key] + reason_text = line.strip() + suite_entry["reason"] = reason_text + suite_entry["testcases"] = [] + current_test = None + current_details = [] + continue + test_match = TEST_LINE_RE.match(line) if test_match: number = test_match.group(1).strip()