test.bash: call vet early
This commit is contained in:
parent
967e7bd125
commit
e1833fa26a
@ -4,5 +4,4 @@ set -eu
|
|||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
export CGO_ENABLED=0
|
CGO_ENABLED=0 ./build.bash -tags without_openssl
|
||||||
exec ./build.bash -tags without_openssl
|
|
||||||
|
12
test.bash
12
test.bash
@ -26,18 +26,18 @@ done
|
|||||||
source build-without-openssl.bash
|
source build-without-openssl.bash
|
||||||
source build.bash
|
source build.bash
|
||||||
|
|
||||||
go test ./... $*
|
|
||||||
|
|
||||||
# The tests cannot to this themselves as they are run in parallel.
|
|
||||||
# Don't descend into possibly still mounted example filesystems.
|
|
||||||
rm -Rf --one-file-system $TESTDIR
|
|
||||||
|
|
||||||
if go tool | grep vet > /dev/null ; then
|
if go tool | grep vet > /dev/null ; then
|
||||||
go tool vet -all -shadow .
|
go tool vet -all -shadow .
|
||||||
else
|
else
|
||||||
echo "\"go tool vet\" not available - skipping"
|
echo "\"go tool vet\" not available - skipping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
go test ./... $*
|
||||||
|
|
||||||
|
# The tests cannot to this themselves as they are run in parallel.
|
||||||
|
# Don't descend into possibly still mounted example filesystems.
|
||||||
|
rm -Rf --one-file-system $TESTDIR
|
||||||
|
|
||||||
if grep -R "panic(" internal ; then
|
if grep -R "panic(" internal ; then
|
||||||
echo "Please use log.Panic instead of naked panic!"
|
echo "Please use log.Panic instead of naked panic!"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user