From b0a87bd25d072695efe5c51ee445ecea8c70dd19 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Sat, 15 Jan 2022 06:03:55 -0500 Subject: [PATCH] update --- src/main/test-mr.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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.