cloudinit/test
Seth Pellegrino 86909e5bcb test: added coreos-cloudinit_test to test script
Include the root project directory in packages
to be built/tested.
2015-11-11 08:06:36 -08:00

44 lines
737 B
Bash
Executable File

#!/bin/bash -e
source ./build
SRC="
config
config/validate
datasource
datasource/configdrive
datasource/file
datasource/metadata
datasource/metadata/cloudsigma
datasource/metadata/digitalocean
datasource/metadata/ec2
datasource/proc_cmdline
datasource/test
datasource/url
datasource/vmware
datasource/waagent
initialize
network
pkg
system
.
"
echo "Checking gofix..."
go tool fix -diff $SRC
echo "Checking gofmt..."
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}/}
echo "Checking govet..."
go vet $VET_TEST
echo "Running tests..."
go test -timeout 60s -cover $@ ${VET_TEST} --race
echo "Success"