Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/log_parser/scmi/json_to_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
</style>
Expand Down Expand Up @@ -130,6 +131,7 @@ def build_html(overall_summary, test_results, chart_b64, dest_html, suite_name,
<div class="detailed-summary">
{% for suite in test_results %}
<div class="test-suite-header">Test Suite: {{ suite.Test_suite }}</div>
<div class="suite-reason"><strong>Reason:</strong> {{ suite.reason | default('N/A') }}</div>
<table>
<thead>
<tr>
Expand Down
17 changes: 17 additions & 0 deletions common/log_parser/scmi/logs_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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(),
}
Expand Down Expand Up @@ -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()
Expand Down