packer-cn/test.sh

20 lines
353 B
Bash
Raw Normal View History

2018-03-23 17:54:08 -04:00
#!/bin/sh
2017-07-29 20:56:10 -04:00
2018-03-23 17:54:08 -04:00
set -eux
2018-05-16 09:36:14 -04:00
export PACKER_ACC=1
RETVAL=0
for file in $(find ./ -type f ! -path "./vendor/*" -name '*.go' -print)
do
if [[ -n "$(gofmt -l "$file")" ]]
then
echo -e "$file does not conform to gofmt rules. Run: gofmt -s -w $file"
RETVAL=1
fi
done
exit $RETVAL
go test -v -count 1 -timeout 20m ./driver ./iso ./clone