Skip to content

Commit 1c7d24e

Browse files
committed
Flag mismatched NIC results in report
1 parent 89138b6 commit 1c7d24e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/validation/tools/combine_reports.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,27 @@ def build_dataframe(
115115
) -> pd.DataFrame:
116116
ordered_tests = sorted(set(keys), key=lambda item: (item[0], item[1]))
117117
rows = []
118+
nic_columns = list(data.keys())
118119

119120
for test_file, test_case in ordered_tests:
120121
row = {
121122
"Test File": test_file,
122123
"Test Case": test_case,
123124
}
124-
for nic, mapping in data.items():
125+
seen_statuses = set()
126+
for nic in nic_columns:
127+
mapping = data[nic]
125128
row[nic] = mapping.get((test_file, test_case), DEFAULT_STATUS)
129+
seen_statuses.add(row[nic])
130+
131+
if len(seen_statuses) > 1:
132+
row["Comments"] = "Inconsistent across NICs"
133+
else:
134+
row["Comments"] = ""
126135
rows.append(row)
127136

128-
return pd.DataFrame(rows)
137+
columns = ["Test File", "Test Case", *nic_columns, "Comments"]
138+
return pd.DataFrame(rows, columns=columns)
129139

130140

131141
def main() -> None:

0 commit comments

Comments
 (0)