diff --git a/src/main/test-mr.sh b/src/main/test-mr.sh index 9c625f3..1cf739a 100644 --- a/src/main/test-mr.sh +++ b/src/main/test-mr.sh @@ -1,15 +1,22 @@ #!/usr/bin/env bash # -# basic map-reduce test +# map-reduce tests # -RACE= +# comment this out to run the tests without the Go race detector. +RACE=-race -if [ "$OSTYPE" != "darwin" ] +if [ "$OSTYPE" = "darwin" ] then - # comment this out to run the tests without the Go race detector. - RACE=-race + if go version | grep 'go1.17.[012345]' + then + # -race with plug-ins on x86 MacOS 12 with + # go1.17 before 1.17.6 sometimes crash. + RACE= + echo '*** Turning off -race since it may not work on a Mac' + echo ' with ' `go version` + fi fi # run the test in a fresh sub-directory.