Skip to content

Commit 6f5f2bb

Browse files
authored
CI/test: add race detection check (openservicemesh#4157)
Adds race detection for Go unit tests. Signed-off-by: Shashank Ram <[email protected]>
1 parent 92c7760 commit 6f5f2bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/test-w-coverage.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ readarray -t modules < <(go list ./... | \
1414

1515
go test -timeout 120s \
1616
-failfast \
17+
-race \
1718
-v \
1819
-coverprofile=coverage.txt.with_generated_code \
19-
-covermode count "${modules[@]}" | tee testoutput.txt || { echo "go test returned non-zero"; exit 1; }
20+
-covermode atomic "${modules[@]}" | tee testoutput.txt || { echo "go test returned non-zero"; exit 1; }
2021

2122
# shellcheck disable=SC2002
2223
cat coverage.txt.with_generated_code | grep -v "_generated.go" | grep -v "fake.go" | grep -v "pkg/gen" | grep -v "pkg/apis" > coverage.txt

0 commit comments

Comments
 (0)