Skip to content

Commit

Permalink
Merge pull request #3820 from dgageot/fix-make-quicktest
Browse files Browse the repository at this point in the history
Fix `make quicktest`
  • Loading branch information
nkubala authored Mar 16, 2020
2 parents 0e6bfc5 + dbb0e3c commit 9edbdd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
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-amd64 darwin-amd64 windows-amd64.exe linux-arm64
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

0 comments on commit 9edbdd5

Please sign in to comment.