aboutsummaryrefslogtreecommitdiff
path: root/test.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-17 19:41:29 +0100
committerJakob Unterwurzacher2017-02-17 19:43:16 +0100
commit7fbe69bfa67ad7794d58c113be84093dc8b76d5a (patch)
tree3f0bc7929067c68e7bdadda0cf0a927a13fd4114 /test.bash
parent07b4b9d60b65066276aba98998304d26cd69bccb (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-xtest.bash7
1 files changed, 5 insertions, 2 deletions
diff --git a/test.bash b/test.bash
index e1046c4..664ca42 100755
--- a/test.bash
+++ b/test.bash
@@ -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 .