diff options
author | Jakob Unterwurzacher | 2017-02-17 19:41:29 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-02-17 19:43:16 +0100 |
commit | 7fbe69bfa67ad7794d58c113be84093dc8b76d5a (patch) | |
tree | 3f0bc7929067c68e7bdadda0cf0a927a13fd4114 /test.bash | |
parent | 07b4b9d60b65066276aba98998304d26cd69bccb (diff) |
tests.bash: OSX compat: use "flock -n" and skip openssl build
Mac OS X flock does not support "--nonblock", but does support "-n":
https://github.com/discoteq/flock/blob/master/man/flock.1.ronn
Skip the openssl build because it requires
1) openssl
2) fixing the import paths in gocryptfs
Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-280464400
Diffstat (limited to 'test.bash')
-rwxr-xr-x | test.bash | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -12,7 +12,7 @@ mkdir -p $TESTDIR ( # Prevent multiple parallel test.bash instances as this causes # all kinds of mayham -if ! flock --nonblock 200 ; then +if ! flock -n 200 ; then echo "Could not acquire lock on $LOCKFILE - already running?" exit 1 fi @@ -25,7 +25,10 @@ for i in $(mount | grep $TESTDIR | cut -f3 -d" "); do done source build-without-openssl.bash -source build.bash +# Building with openssl is difficult on OSX, so only do it on Linux. +if [[ $OSTYPE == linux* ]] ; then + source build.bash +fi if go tool | grep vet > /dev/null ; then go tool vet -all -shadow . |