Skip to content

Commit 6e37551

Browse files
committed
Fix
1 parent ce64cf0 commit 6e37551

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/flakeguard/runner/runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ func parseTestResults(filePaths []string) ([]reports.TestResult, error) {
142142
result.Runs++
143143
case "pass":
144144
result.PassRatio = (result.PassRatio*float64(result.Runs-1) + 1) / float64(result.Runs)
145+
result.PassRatioPercentage = fmt.Sprintf("%.0f%%", result.PassRatio*100)
145146
result.Durations = append(result.Durations, entry.Elapsed)
146147
case "output":
147148
result.Outputs = append(result.Outputs, entry.Output)
148149
case "fail":
149150
result.PassRatio = (result.PassRatio * float64(result.Runs-1)) / float64(result.Runs)
151+
result.PassRatioPercentage = fmt.Sprintf("%.0f%%", result.PassRatio*100)
150152
result.Durations = append(result.Durations, entry.Elapsed)
151153
case "skip":
152154
result.Skipped = true

0 commit comments

Comments
 (0)