From b9248ef2e65a02d11aeea263e3a2ca9dba3e1b09 Mon Sep 17 00:00:00 2001 From: kami Date: Sun, 5 Jul 2026 02:07:04 +0400 Subject: [PATCH] make: add race+coverprofile to test target; add build-caldav target - test target now runs with -race and emits coverage.out for coverage reporting. - New build-caldav target builds cmd/mavcaldav without CGO (pure Go). - build-caldav added to PHONY and build dependency chain. - mavcaldav added to clean target. --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index eb3e487..36a0601 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,11 @@ PIPER_BIN := $(shell pwd)/deps/piper/piper PIPER_MODEL := $(shell pwd)/models/tts/ru_RU-irina-medium.onnx PIPER_ESPEAK := $(shell pwd)/deps/piper/espeak-ng-data -.PHONY: all build build-stt build-tts build-daemon build-client build-web build-poll clean test run-stt run-tts run-web +.PHONY: all build build-stt build-tts build-daemon build-client build-web build-poll build-caldav clean test run-stt run-tts run-web all: build -build: build-stt build-tts build-daemon build-client build-web build-poll +build: build-stt build-tts build-daemon build-client build-web build-poll build-caldav build-stt: CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \ @@ -36,12 +36,15 @@ build-web: build-poll: $(GO) build $(GOFLAGS) -o mavpoll ./cmd/mavpoll/ +build-caldav: + $(GO) build $(GOFLAGS) -o mavcaldav ./cmd/mavcaldav/ + run-web: build-web ./mavweb -addr :9200 -voice 127.0.0.1:9100 test: CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \ - $(GO) test ./internal/... ./cmd/... + $(GO) test -race -coverprofile=coverage.out ./internal/... ./cmd/... run-stt: build-stt LD_LIBRARY_PATH="$(shell pwd)/deps/lib" \ @@ -69,4 +72,4 @@ deps-piper: tar -xzf /tmp/piper.tar.gz -C deps/ clean: - rm -f mavend mavenclient mavsttd mavttsd mavweb mavpoll + rm -f mavend mavenclient mavsttd mavttsd mavweb mavpoll mavcaldav