1
0
mirror of https://github.com/rancher/os.git synced 2025-06-29 08:16:49 +00:00
os/config/cloudinit/test

28 lines
444 B
Plaintext
Raw Normal View History

2015-11-26 12:37:01 +00:00
#!/bin/bash -e
source ./build
SRC=$(find . -name '*.go' \
-not -path "./vendor/*")
PKG=$(cd gopath/src/${REPO_PATH}; go list ./... | \
grep --invert-match vendor)
2015-11-26 12:37:01 +00:00
2015-12-18 05:43:56 +00:00
echo "Checking gofix..."
go tool fix -diff $SRC
2015-11-26 12:37:01 +00:00
echo "Checking gofmt..."
res=$(gofmt -d -e -s $SRC)
echo "${res}"
if [ -n "${res}" ]; then
exit 1
fi
2015-11-26 12:37:01 +00:00
echo "Checking govet..."
go vet $PKG
2015-12-18 05:43:56 +00:00
echo "Running tests..."
go test -timeout 60s -cover $@ ${PKG} --race
2015-11-26 12:37:01 +00:00
echo "Success"