2015-10-07 22:08:30 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-11-03 21:11:07 +01:00
|
|
|
set -eu
|
2015-10-07 22:08:30 +02:00
|
|
|
|
2016-01-09 14:20:04 +01:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2016-10-08 21:59:21 +02:00
|
|
|
# Clean up dangling filesystem
|
|
|
|
for i in $(cat /proc/mounts | grep /tmp/gocryptfs-test-parent | cut -f2 -d" "); do
|
|
|
|
echo "Warning: unmounting leftover filesystem: $i"
|
|
|
|
fusermount -u $i
|
|
|
|
done
|
|
|
|
|
2015-11-01 15:22:53 +01:00
|
|
|
source build.bash
|
2016-02-06 20:22:45 +01:00
|
|
|
|
2016-02-06 20:25:18 +01:00
|
|
|
go test ./... $*
|
2016-04-10 21:29:42 +02:00
|
|
|
|
2016-10-08 21:59:21 +02:00
|
|
|
# The tests cannot to this themselves as they are run in parallel.
|
|
|
|
# Don't descend into possibly still mounted example filesystems.
|
2016-06-30 00:57:14 +02:00
|
|
|
rm -Rf --one-file-system /tmp/gocryptfs-test-parent
|
|
|
|
|
2016-10-04 22:42:30 +02:00
|
|
|
if go tool | grep vet > /dev/null ; then
|
|
|
|
go tool vet -all -shadow .
|
|
|
|
else
|
|
|
|
echo "\"go tool vet\" not available - skipping"
|
|
|
|
fi
|