From 61892666a7f6befb5c84d00c6f4446e2c705e5a9 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Fri, 22 Mar 2024 09:00:48 +0100 Subject: [PATCH] Add test target in Makefile --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 85f5151..3b2edbc 100644 --- a/Makefile +++ b/Makefile @@ -29,20 +29,21 @@ install: $(APP) @install -Dpm 755 $(APP) $${WORKSPACE}/usr/$(BINDIR)/$(APP) @install -Dpm 600 config.json $${WORKSPACE}/etc/$(APP)/$(APP).json -.PHONY: clean +.PHONY: clean test fmt .ONESHELL: clean: rm -f $(APP) -.PHONY: fmt +test: + $(info ===> TESTING) + @go clean -testcache + @go build ./... + @go vet ./... + @go test ./... + fmt: go fmt $(GOSRC_APP) -# Examine Go source code and reports suspicious constructs -.PHONY: vet -vet: - go vet ./... - # Run linter for the Go programming language. # Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules .PHONY: staticcheck