Skip to content

Commit

Permalink
test: race detector doesn't work on armv7l
Browse files Browse the repository at this point in the history
Test fails without this fix on armv7l:

    go test: -race is only supported on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64
  • Loading branch information
Brandon Philips committed Aug 9, 2015
1 parent fb19512 commit 1b894c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b894c6

Please # to comment.