chore: disable -race by default and create a new make target

This commit is contained in:
Prem Chaitanya Prathi 2023-08-07 21:20:36 +05:30
parent af7471d158
commit 6429af9ca7
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -72,8 +72,11 @@ lint:
@echo "lint"
@golangci-lint --exclude=SA1019 run ./... --deadline=5m
test-with-race:
${GOBIN} test -race -timeout 300s ./waku/...
test:
${GOBIN} test -race -timeout 300s ./waku/... -coverprofile=${GO_TEST_OUTFILE}.tmp
${GOBIN} test -timeout 300s ./waku/... -coverprofile=${GO_TEST_OUTFILE}.tmp
cat ${GO_TEST_OUTFILE}.tmp | grep -v ".pb.go" > ${GO_TEST_OUTFILE}
${GOBIN} tool cover -html=${GO_TEST_OUTFILE} -o ${GO_HTML_COV}
@ -187,3 +190,5 @@ test-onchain: BUILD_TAGS += include_onchain_tests
test-onchain:
${GOBIN} test -v -count 1 -tags="${BUILD_TAGS}" github.com/waku-org/go-waku/waku/v2/protocol/rln
test-onchain-with-race:
${GOBIN} test -race -v -count 1 -tags="${BUILD_TAGS}" github.com/waku-org/go-waku/waku/v2/protocol/rln