From 1b894c6b0b8c0689c8c276c0d29367b52cd702de Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sat, 8 Aug 2015 17:45:13 -0700 Subject: [PATCH] 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 --- test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test b/test index 9eb0b23c616..88c23a9b7d8 100755 --- a/test +++ b/test @@ -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