Skip to content

Commit 20f3345

Browse files
author
Brandon Philips
committed
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
1 parent 564d132 commit 20f3345

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ split=(${NO_RACE_TEST// / })
4545
NO_RACE_TEST=${split[@]/#/${REPO_PATH}/}
4646

4747
echo "Running tests..."
48-
go test -timeout 3m ${COVER} $@ ${TEST} --race -cpu 1,2,4
48+
49+
MACHINE_TYPE=$(uname -m)
50+
if [ $MACHINE_TYPE != "armv7l" ]; then
51+
RACE="--race"
52+
fi
53+
54+
go test -timeout 3m ${COVER} $@ ${TEST} ${RACE} -cpu 1,2,4
4955
go test -timeout 3m ${COVER} $@ ${NO_RACE_TEST} -cpu 1,2,4
5056

5157
if [ -n "$INTEGRATION" ]; then

0 commit comments

Comments
 (0)