2014-11-10 02:48:09 +00:00
|
|
|
#!/bin/bash
|
2017-10-31 13:12:15 +00:00
|
|
|
EXIT_CODE=0
|
2017-03-29 03:09:53 +00:00
|
|
|
echo "gofmt"
|
2017-10-31 13:12:15 +00:00
|
|
|
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./vendor/*")) || EXIT_CODE=1
|
|
|
|
for pkg in $(go list ./... | grep -v '/vendor/' ); do
|
|
|
|
echo "testing $pkg"
|
|
|
|
echo "go vet $pkg"
|
|
|
|
go vet "$pkg" || EXIT_CODE=1
|
|
|
|
echo "go test -v $pkg"
|
|
|
|
go test -v -timeout 90s "$pkg" || EXIT_CODE=1
|
|
|
|
echo "go test -v -race $pkg"
|
|
|
|
GOMAXPROCS=4 go test -v -timeout 90s0s -race "$pkg" || EXIT_CODE=1
|
|
|
|
done
|
|
|
|
exit $EXIT_CODE
|