From 8861e0b161fa9465e31f67bf3e753f04bb412553 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Thu, 10 May 2018 10:56:24 +0800 Subject: [PATCH] test: add -race to go test to detect race Signed-off-by: Allen Sun --- hack/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/build b/hack/build index b46c873d4..e51813612 100755 --- a/hack/build +++ b/hack/build @@ -53,7 +53,7 @@ function unit-test() go test -i for d in `go list ./... | grep -v 'github.com/alibaba/pouch/test' | grep -v 'github.com/alibaba/pouch/extra' | grep -v 'github.com/alibaba/pouch/vendor' ` do - go test -coverprofile=profile.out -covermode=atomic $d + go test -race -coverprofile=profile.out -covermode=atomic $d if [ -f profile.out ] ; then cat profile.out >> coverage.txt rm profile.out >/dev/null 2>&1