Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix make quicktest #3820

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ GKE_ZONE ?= us-central1-a
SUPPORTED_PLATFORMS = linux-$(GOARCH) darwin-$(GOARCH) windows-$(GOARCH).exe
BUILD_PACKAGE = $(REPOPATH)/cmd/skaffold

SKAFFOLD_TEST_PACKAGES = $(shell go list ./... | grep -v diag)
SKAFFOLD_TEST_PACKAGES = ./pkg/skaffold/... ./cmd/... ./hack/... ./pkg/webhook/...
GO_FILES = $(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/diag/*")

VERSION_PACKAGE = $(REPOPATH)/pkg/skaffold/version
Expand Down
10 changes: 3 additions & 7 deletions hack/gotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ RESET='\033[0m'
LOG=$(mktemp -t tests.json.XXXXXX)
trap "rm -f $LOG" EXIT

if [[ " ${@}" =~ "pkg/skaffold" ]]; then
echo "go test ./pkg/skaffold/..."
else
echo "go test $@"
fi
echo "go test $@"

# Keep execution simple for users who do not have jq installed
if [[ ! $(command -v jq >/dev/null) ]]; then
if ! $(command -v jq > /dev/null); then
go test $* | sed ''/FAIL/s//`printf "${RED}FAIL${RESET}"`/''
exit ${PIPESTATUS[0]}
fi

if [[ " ${@} " =~ "-v" ]]; then
if [[ $@ == *"-v"* ]]; then
JQ_FILTER='select(has("Output") and (.Action=="output")) | .Output'
else
JQ_FILTER='select(has("Output") and (.Action=="output") and (has("Test")|not) and (.Output!="PASS\n") and (.Output!="FAIL\n") and (.Output|startswith("coverage:")|not) and (.Output|contains("[no test files]")|not)) | .Output'
Expand Down