Skip to content

Commit a8fc106

Browse files
committed
fix(scaletest/harness): fix div-zero error
1 parent 2dd49cc commit a8fc106

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scaletest/harness/results.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ func (r *Results) PrintText(w io.Writer) {
114114
}
115115

116116
_, _ = fmt.Fprintln(w, "\n\nTest results:")
117+
if r.TotalRuns == 0 {
118+
_, _ = fmt.Fprintln(w, "\tNo tests run")
119+
return
120+
}
117121
_, _ = fmt.Fprintf(w, "\tPass: %d\n", r.TotalPass)
118122
_, _ = fmt.Fprintf(w, "\tFail: %d\n", r.TotalFail)
119123
_, _ = fmt.Fprintf(w, "\tTotal: %d\n", r.TotalRuns)

0 commit comments

Comments
 (0)