Skip to content

Commit 302f784

Browse files
committed
ci: if FAIL => PASS but in the intermittent list, show the info
see: #7522 (comment)
1 parent a64fce8 commit 302f784

File tree

3 files changed

+563
-5
lines changed

3 files changed

+563
-5
lines changed

.github/workflows/code-quality.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,7 @@ jobs:
187187
with:
188188
src: "./util"
189189
args: format --check
190+
- name: Run Python unit tests
191+
shell: bash
192+
run: |
193+
python3 -m unittest util/test_compare_test_results.py

util/compare_test_results.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,17 @@ def main():
143143
real_regressions = [r for r in regressions if r not in ignore_list]
144144
intermittent_regressions = [r for r in regressions if r in ignore_list]
145145

146+
# Filter out intermittent issues from fixes
147+
real_fixes = [f for f in fixes if f not in ignore_list]
148+
intermittent_fixes = [f for f in fixes if f in ignore_list]
149+
146150
# Print summary stats
147151
print(f"Total tests in current run: {len(current_flat)}")
148152
print(f"Total tests in reference: {len(reference_flat)}")
149153
print(f"New regressions: {len(real_regressions)}")
150154
print(f"Intermittent regressions: {len(intermittent_regressions)}")
151-
print(f"Fixed tests: {len(fixes)}")
155+
print(f"Fixed tests: {len(real_fixes)}")
156+
print(f"Intermittent fixes: {len(intermittent_fixes)}")
152157
print(f"Newly skipped tests: {len(newly_skipped)}")
153158
print(f"Newly passing tests (previously skipped): {len(newly_passing)}")
154159

@@ -162,18 +167,26 @@ def main():
162167
print(f"::error ::{msg}", file=sys.stderr)
163168
output_lines.append(msg)
164169

165-
# Report intermittent issues
170+
# Report intermittent issues (regressions)
166171
if intermittent_regressions:
167-
print("\nINTERMITTENT ISSUES (ignored):", file=sys.stderr)
172+
print("\nINTERMITTENT ISSUES (ignored regressions):", file=sys.stderr)
168173
for test in sorted(intermittent_regressions):
169174
msg = f"Skip an intermittent issue {test} (fails in this run but passes in the 'main' branch)"
170175
print(f"::notice ::{msg}", file=sys.stderr)
171176
output_lines.append(msg)
172177

178+
# Report intermittent issues (fixes)
179+
if intermittent_fixes:
180+
print("\nINTERMITTENT ISSUES (ignored fixes):", file=sys.stderr)
181+
for test in sorted(intermittent_fixes):
182+
msg = f"Skipping an intermittent issue {test} (passes in this run but fails in the 'main' branch)"
183+
print(f"::notice ::{msg}", file=sys.stderr)
184+
output_lines.append(msg)
185+
173186
# Report fixes
174-
if fixes:
187+
if real_fixes:
175188
print("\nFIXED TESTS:", file=sys.stderr)
176-
for test in sorted(fixes):
189+
for test in sorted(real_fixes):
177190
msg = f"Congrats! The gnu test {test} is no longer failing!"
178191
print(f"::notice ::{msg}", file=sys.stderr)
179192
output_lines.append(msg)

0 commit comments

Comments
 (0)