Skip to content

Commit 3be413f

Browse files
authored
Clarify -count default
Count default is only 1 when the test is not cached. If the test is cached it will not rerun the test. [This causes confusion because the only way to run tests without cache is to use -count=1.](#39056) According to the documentation as is `-count=1` should have no effect. Changing this CLI documentation to clarify the behavior.
1 parent 181e8cd commit 3be413f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/go/internal/test/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ control the execution of any test:
208208
(for example, -benchtime 100x).
209209
210210
-count n
211-
Run each test and benchmark n times (default 1).
211+
Run each test and benchmark n times (default 1 unless cached).
212212
If -cpu is set, run n times for each GOMAXPROCS value.
213213
Examples are always run once.
214214

0 commit comments

Comments
 (0)