Skip to content

Commit 7e5ad79

Browse files
authored
gh_report: include skipped tests in the report if they match known_failures.txt (#3767)
## Why When CloudSlow tests are added to known_failures.txt then TestAccept shows up as "RECOVERED" even though there are no subtests that actually recovered. This PR does not fix that but at least includes those skipped tests in the output so one can understand the reason for "RECOVERED" status.
1 parent 538ac77 commit 7e5ad79

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tools/gh_parse.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
# These happen if test matches known_failures.txt
3434
KNOWN_FAILURE = "🟨\u200bKNOWN"
3535
RECOVERED = "💚\u200bRECOVERED"
36+
KNOWN_SKIP = "🙈\u200bSKIP"
3637

3738
# The order is important - in case of ambiguity, earlier one gets preference.
3839
# For examples, each environment gets a summary icon which is earliest action in this list among all tests.
39-
INTERESTING_ACTIONS = (PANIC, BUG, FAIL, KNOWN_FAILURE, MISSING, FLAKY, RECOVERED)
40+
INTERESTING_ACTIONS = (PANIC, BUG, FAIL, KNOWN_FAILURE, MISSING, FLAKY, RECOVERED, KNOWN_SKIP)
4041
ACTIONS_WITH_ICON = INTERESTING_ACTIONS + (PASS, SKIP)
4142

4243
ACTION_MESSAGES = {
@@ -323,12 +324,13 @@ def mark_known_failures(results, known_failures_config):
323324
marked_results = {}
324325
for test_key, action in results.items():
325326
package_name, testname = test_key
326-
if known_failures_config and action == FAIL and known_failures_config.matches(package_name, testname):
327-
marked_results[test_key] = KNOWN_FAILURE
328-
elif known_failures_config and action == PASS and known_failures_config.matches(package_name, testname):
329-
marked_results[test_key] = RECOVERED
330-
else:
331-
marked_results[test_key] = action
327+
if known_failures_config and known_failures_config.matches(package_name, testname):
328+
action = {
329+
FAIL: KNOWN_FAILURE,
330+
PASS: RECOVERED,
331+
SKIP: KNOWN_SKIP,
332+
}.get(action, action)
333+
marked_results[test_key] = action
332334
return marked_results
333335

334336

0 commit comments

Comments
 (0)