2014-03-04 16:50:54 -08:00
|
|
|
#!/bin/bash -e
|
2014-05-10 01:42:57 -07:00
|
|
|
|
|
|
|
source ./build
|
|
|
|
|
2015-08-12 10:53:32 -07:00
|
|
|
SRC="
|
2014-09-21 19:22:13 -07:00
|
|
|
config
|
2014-10-22 11:27:51 -07:00
|
|
|
config/validate
|
2014-09-21 19:22:13 -07:00
|
|
|
datasource
|
|
|
|
datasource/configdrive
|
|
|
|
datasource/file
|
|
|
|
datasource/metadata
|
|
|
|
datasource/metadata/cloudsigma
|
|
|
|
datasource/metadata/digitalocean
|
|
|
|
datasource/metadata/ec2
|
|
|
|
datasource/proc_cmdline
|
2015-02-13 21:01:44 -08:00
|
|
|
datasource/test
|
2014-09-21 19:22:13 -07:00
|
|
|
datasource/url
|
2015-05-18 21:10:34 -07:00
|
|
|
datasource/vmware
|
2014-10-10 11:27:27 -07:00
|
|
|
datasource/waagent
|
2014-09-21 19:22:13 -07:00
|
|
|
initialize
|
|
|
|
network
|
|
|
|
pkg
|
|
|
|
system
|
2015-11-10 08:26:27 -08:00
|
|
|
.
|
2015-08-12 10:53:32 -07:00
|
|
|
"
|
2014-03-04 16:50:54 -08:00
|
|
|
|
2015-08-12 10:53:32 -07:00
|
|
|
echo "Checking gofix..."
|
|
|
|
go tool fix -diff $SRC
|
2014-05-10 01:42:57 -07:00
|
|
|
|
|
|
|
echo "Checking gofmt..."
|
2015-08-12 10:53:32 -07:00
|
|
|
gofmt -d -e $SRC
|
|
|
|
|
|
|
|
# split SRC into an array and prepend REPO_PATH to each local package for go vet
|
|
|
|
split_vet=(${SRC// / })
|
|
|
|
VET_TEST=${split_vet[@]/#/${REPO_PATH}/}
|
2014-05-10 01:42:57 -07:00
|
|
|
|
2014-10-23 11:46:40 -07:00
|
|
|
echo "Checking govet..."
|
2015-08-12 10:53:32 -07:00
|
|
|
go vet $VET_TEST
|
|
|
|
|
|
|
|
echo "Running tests..."
|
|
|
|
go test -timeout 60s -cover $@ ${VET_TEST} --race
|
2014-10-23 11:46:40 -07:00
|
|
|
|
2014-05-10 01:42:57 -07:00
|
|
|
echo "Success"
|