test: race detector doesn't work on armv7l

Test fails without this fix on armv7l:

    go test: -race is only supported on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64
This commit is contained in:
Brandon Philips 2015-08-08 17:45:13 -07:00 committed by Yicheng Qin
parent 07b82832f0
commit d2ecd9cecf

8
test
View File

@ -45,7 +45,13 @@ split=(${NO_RACE_TEST// / })
NO_RACE_TEST=${split[@]/#/${REPO_PATH}/}
echo "Running tests..."
go test -timeout 3m ${COVER} $@ ${TEST} --race -cpu 1,2,4
MACHINE_TYPE=$(uname -m)
if [ $MACHINE_TYPE != "armv7l" ]; then
RACE="--race"
fi
go test -timeout 3m ${COVER} $@ ${TEST} ${RACE} -cpu 1,2,4
go test -timeout 3m ${COVER} $@ ${NO_RACE_TEST} -cpu 1,2,4
if [ -n "$INTEGRATION" ]; then