diff --git a/docs/quick-start-guide.md b/docs/quick-start-guide.md index 9d1a7d73..be822ef0 100644 --- a/docs/quick-start-guide.md +++ b/docs/quick-start-guide.md @@ -134,9 +134,8 @@ discouraged either). Meaning it might work but in the case it doesn't you would have to provide your own patches to fix problems (the project maintainer and community are glad to assist where needed). -There are currently some issues that make `mgmt` less suitable to run for -provisioning macOS (eg: [https://github.com/purpleidea/mgmt/issues/33](https://github.com/purpleidea/mgmt/issues/33)). -But as a client to provision remote servers it should run fine. +There are currently some issues that make `mgmt` less suitable to run for provisioning +macOS. But as a client to provision remote servers it should run fine. Since the primary supported systems are Linux and these are the environments tested for it is wise to run these suites during macOS development as well. To diff --git a/misc/make-deps.sh b/misc/make-deps.sh index 9d9179dd..c058f9da 100755 --- a/misc/make-deps.sh +++ b/misc/make-deps.sh @@ -47,7 +47,7 @@ if [ ! -z "$APT" ]; then fi if [ ! -z "$BREW" ]; then - # coreutils contains gtimeout + # coreutils contains gtimeout, gstat, etc $BREW install libvirt augeas coreutils || true fi diff --git a/recwatch/recwatch.go b/recwatch/recwatch.go index 9f9c26db..fca38d27 100644 --- a/recwatch/recwatch.go +++ b/recwatch/recwatch.go @@ -159,8 +159,8 @@ func (obj *RecWatcher) Watch() error { if obj.Flags.Debug { log.Printf("watcher.Add(%s): Error: %v", current, err) } - - if err == syscall.ENOENT { + // ENOENT for linux, etc and IsNotExist for macOS + if err == syscall.ENOENT || os.IsNotExist(err) { index-- // usually not found, move up one dir index = int(math.Max(1, float64(index))) continue diff --git a/test/shell/file-mode.sh b/test/shell/file-mode.sh index 08f26e65..3f31646f 100755 --- a/test/shell/file-mode.sh +++ b/test/shell/file-mode.sh @@ -1,13 +1,9 @@ #!/bin/bash -e -if [[ $(uname) == "Darwin" ]] ; then - # https://github.com/purpleidea/mgmt/issues/33 - echo "This test is broken on macOS, skipping!" - exit -fi - set -x +. ../util.sh + # run till completion $timeout --kill-after=60s 55s "$MGMT" run --yaml file-mode.yaml --converged-timeout=5 --no-watch --tmp-prefix & pid=$! @@ -19,7 +15,7 @@ ls -l /tmp/mgmt test -e /tmp/mgmt/f1 test -e /tmp/mgmt/f2 test -e /tmp/mgmt/f3 -test $(stat -c%a /tmp/mgmt/f2) = 741 -test $(stat -c%a /tmp/mgmt/f3) = 614 +test $($STAT -c%a /tmp/mgmt/f2) = 741 +test $($STAT -c%a /tmp/mgmt/f3) = 614 exit $e diff --git a/test/shell/file-move.sh b/test/shell/file-move.sh index 8e0add4a..68d859d6 100755 --- a/test/shell/file-move.sh +++ b/test/shell/file-move.sh @@ -1,11 +1,5 @@ #!/bin/bash -e -if [[ $(uname) == "Darwin" ]] ; then - # https://github.com/purpleidea/mgmt/issues/33 - echo "This test is broken on macOS, skipping!" - exit -fi - mkdir -p /tmp/mgmt/ rm /tmp/mgmt/f1 || true diff --git a/test/shell/load0.sh b/test/shell/load0.sh index 8ac69ec8..61545e92 100755 --- a/test/shell/load0.sh +++ b/test/shell/load0.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -if env | grep -q -e '^TRAVIS=true$' && [[ $(uname) == "Darwin" ]]; then +if env | grep -q -e '^TRAVIS=true$'; then # loadavg glibc calls don't seem to work properly on osx OS in travis echo "Travis and Jenkins give wonky results here, skipping test!" exit @@ -18,9 +18,6 @@ regex="load average: [0-9]\,[0-9]{3,}, [0-9]\,[0-9]{3,}, [0-9]\,[0-9]{3,}" tmpdir="$($mktemp --tmpdir -d tmp.XXX)" -# macOS workaround https://github.com/purpleidea/mgmt/issues/33 -touch "$tmpdir/loadavg" - cat > "$tmpdir/load0.mcl" <