mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-10-01 04:05:38 +00:00
Support make test WHAT=.....
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>
This commit is contained in:
+15
-3
@@ -20,8 +20,20 @@ set -o pipefail
|
||||
|
||||
export CGO_ENABLED=0
|
||||
|
||||
TARGETS=$(for d in "$@"; do echo ./$d/...; done)
|
||||
TARGETS=(
|
||||
./cmd/...
|
||||
./pkg/...
|
||||
)
|
||||
|
||||
echo "Running tests:"
|
||||
go test -installsuffix "static" -timeout 60s ${TARGETS}
|
||||
if [[ ${#@} -ne 0 ]]; then
|
||||
TARGETS=("$@")
|
||||
fi
|
||||
|
||||
echo "Running tests:" "${TARGETS[@]}"
|
||||
|
||||
if [[ -n "${GOFLAGS:-}" ]]; then
|
||||
echo "GOFLAGS: ${GOFLAGS}"
|
||||
fi
|
||||
|
||||
go test -installsuffix "static" -timeout 60s "${TARGETS[@]}"
|
||||
echo "Success!"
|
||||
|
||||
Reference in New Issue
Block a user