Skip to content

Commit

Permalink
Don't try to use gotest as "go test" (#711)
Browse files Browse the repository at this point in the history
* Remove gotest stuff from Makefile

It was just used for colored output. The which statement was rather
chatty when building k0sctl without having gotest in the path, too.

Signed-off-by: Tom Wieczorek <[email protected]>

* Suppress which stderr output

The which statement was quite chatty when building k0sctl without having
golangci-lint in the path.

Signed-off-by: Tom Wieczorek <[email protected]>

---------

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 authored May 10, 2024
1 parent b061291 commit e9dc44a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,11 @@ smoketests := smoke-basic smoke-basic-rootless smoke-files smoke-upgrade smoke-r
$(smoketests): k0sctl
$(MAKE) -C smoke-test $@

golint := $(shell which golangci-lint)
golint := $(shell which golangci-lint 2>/dev/null)
ifeq ($(golint),)
golint := $(shell go env GOPATH)/bin/golangci-lint
endif

gotest := $(shell which gotest)
ifeq ($(gotest),)
gotest := go test
endif

$(golint):
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

Expand All @@ -75,7 +70,7 @@ lint: $(golint)

.PHONY: test
test: $(GO_SRCS) $(GO_TESTS)
$(gotest) -v ./...
go test -v ./...

.PHONY: install
install: k0sctl
Expand Down

0 comments on commit e9dc44a

Please sign in to comment.