good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit b02bae9d authored by Anmol Sethi's avatar Anmol Sethi
Browse files

Remove -bench from ./ci/test.sh

Testing should not run benchmarks by default, it takes too long.
parent 412f574b
No related branches found
No related tags found
No related merge requests found
......@@ -10,18 +10,16 @@ argv=(
"--junitfile=ci/out/websocket/testReport.xml"
"--format=short-verbose"
--
-race
"-vet=off"
"-bench=."
)
# Interactive usage probably does not want to enable benchmarks, race detection
# turn off vet or use gotestsum by default.
# Interactive usage does not want to turn off vet or use gotestsum by default.
if [[ $# -gt 0 ]]; then
argv=(go test "$@")
fi
# We always want coverage.
# We always want coverage and race detection.
argv+=(
-race
"-coverprofile=ci/out/coverage.prof"
"-coverpkg=./..."
)
......
......@@ -43,12 +43,10 @@ For coverage details locally, please see `ci/out/coverage.html` after running `c
See [ci/image/Dockerfile](ci/image/Dockerfile) for the installation of the CI dependencies on Ubuntu.
You can also run tests normally with `go test`.
`ci/test.sh` just passes a default set of flags to `go test` to collect coverage,
enable the race detector, run benchmarks and also prettifies the output.
You can also run tests normally with `go test`. `ci/test.sh` just passes a default set of flags to
`go test` to collect coverage, enable the race detector and also prettifies the output.
If you pass flags to `ci/test.sh`, it will pass those flags directly to `go test` but will also
collect coverage for you. This is nice for when you don't want to wait for benchmarks
or the race detector but want to have coverage.
You can pass flags to `ci/test.sh` if you want to run a specific test or otherwise
control the behaviour of `go test`.
Coverage percentage from codecov and the CI scripts will be different because they are calculated differently.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment