Skip to content

Commit 2bd7ee9

Browse files
sylvestrecakebaker
andauthored
Use match in the python script
Co-authored-by: Daniel Hofstetter <[email protected]>
1 parent 2f87286 commit 2bd7ee9

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

util/analyze-gnu-results.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,17 @@ def analyze_test_results(json_data):
103103
for test_name, result in tests.items():
104104
total_tests += 1
105105

106-
if result == "PASS":
107-
pass_count += 1
108-
elif result == "FAIL":
109-
fail_count += 1
110-
elif result == "SKIP":
111-
skip_count += 1
112-
elif result == "ERROR":
113-
error_count += 1
114-
elif result == "XPASS":
115-
xpass_count += 1
106+
match result:
107+
case "PASS":
108+
pass_count += 1
109+
case "FAIL":
110+
fail_count += 1
111+
case "SKIP":
112+
skip_count += 1
113+
case "ERROR":
114+
error_count += 1
115+
case "XPASS":
116+
xpass_count += 1
116117

117118
# Return the statistics
118119
return {

0 commit comments

Comments
 (0)