Skip to content

Commit b02bae9

Browse files
committed
Remove -bench from ./ci/test.sh
Testing should not run benchmarks by default, it takes too long.
1 parent 412f574 commit b02bae9

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

ci/test.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ argv=(
1010
"--junitfile=ci/out/websocket/testReport.xml"
1111
"--format=short-verbose"
1212
--
13-
-race
1413
"-vet=off"
15-
"-bench=."
1614
)
17-
# Interactive usage probably does not want to enable benchmarks, race detection
18-
# turn off vet or use gotestsum by default.
15+
# Interactive usage does not want to turn off vet or use gotestsum by default.
1916
if [[ $# -gt 0 ]]; then
2017
argv=(go test "$@")
2118
fi
2219

23-
# We always want coverage.
20+
# We always want coverage and race detection.
2421
argv+=(
22+
-race
2523
"-coverprofile=ci/out/coverage.prof"
2624
"-coverpkg=./..."
2725
)

docs/CONTRIBUTING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ For coverage details locally, please see `ci/out/coverage.html` after running `c
4343

4444
See [ci/image/Dockerfile](ci/image/Dockerfile) for the installation of the CI dependencies on Ubuntu.
4545

46-
You can also run tests normally with `go test`.
47-
`ci/test.sh` just passes a default set of flags to `go test` to collect coverage,
48-
enable the race detector, run benchmarks and also prettifies the output.
46+
You can also run tests normally with `go test`. `ci/test.sh` just passes a default set of flags to
47+
`go test` to collect coverage, enable the race detector and also prettifies the output.
4948

50-
If you pass flags to `ci/test.sh`, it will pass those flags directly to `go test` but will also
51-
collect coverage for you. This is nice for when you don't want to wait for benchmarks
52-
or the race detector but want to have coverage.
49+
You can pass flags to `ci/test.sh` if you want to run a specific test or otherwise
50+
control the behaviour of `go test`.
5351

5452
Coverage percentage from codecov and the CI scripts will be different because they are calculated differently.

0 commit comments

Comments
 (0)