Files
matchbox/vendor/github.com/coreos/ignition/test
Dalton Hubble 948c9d9233 vendor: Switch from godep to glide tool
* Use glide for dependency management
* https://github.com/coreos/docs/issues/775
2016-05-13 10:40:11 -07:00

35 lines
697 B
Bash
Executable File

#!/bin/bash -eu
source ./build
SRC=$(find . -name '*.go' \
-not -path "./internal/vendor/*" \
-not -path "./config/vendor/*" \
-not -path "./config/v1/vendor/*")
PKG=$(cd gopath/src/${REPO_PATH}; go list ./... | \
grep --invert-match vendor)
# https://github.com/golang/go/issues/15067
PKG_VET=$(cd gopath/src/${REPO_PATH}; go list ./... | \
grep --invert-match vendor | \
grep --invert-match internal/log)
echo "Checking gofix..."
go tool fix -diff $SRC
echo "Checking gofmt..."
res=$(gofmt -d -e -s $SRC)
echo "${res}"
if [ -n "${res}" ]; then
exit 1
fi
echo "Checking govet..."
go vet $PKG_VET
echo "Running tests..."
go test -timeout 60s -cover $@ ${PKG} --race
echo "Success"