Improve test script

add usage
verify flag value for -i is numeric
allow multiple targets on the command line
actually capture coverage output
fix lingering GOFLAGS undef issue
fix issue with -i not working at all: ((x++)) returns 1 when x is 0, which is
  incompatible with "set -e"
This commit is contained in:
Tim Hockin
2014-08-29 11:26:59 -07:00
parent 42eea82461
commit 640a1d323d
3 changed files with 81 additions and 36 deletions

View File

@@ -49,10 +49,13 @@ for arg; do
binaries+=("${KUBE_GO_PACKAGE}/${arg}")
done
# Use eval to preserve embedded quoted strings.
eval "goflags=(${GOFLAGS:-})"
# Note that the flags to 'go build' are duplicated in the salt build setup
# (release/build-release.sh) for our cluster deploy. If we add more command
# line options to our standard build we'll want to duplicate them there. As we
# move to distributing pre- built binaries we can eliminate this duplication.
go install ${GOFLAGS:-} \
go install "${goflags[@]:+${goflags[@]}}" \
-ldflags "${version_ldflags}" \
"${binaries[@]}"