diff --git a/scripts/test.sh b/scripts/test.sh index 6e345b1e8f..63f89fc785 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -18,6 +18,11 @@ export MM_SERVER_PATH=$PWD echo "Packages to test: $PACKAGES" echo "GOFLAGS: $GOFLAGS" +if [[ $GOFLAGS == "-race " && $IS_CI == "true" ]] ; +then + export GOMAXPROCS=4 +fi + find . -name 'cprofile*.out' -exec sh -c 'rm "{}"' \; find . -type d -name data -not -path './data' | xargs rm -rf