aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e9c36dd..4869220 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,15 @@
## SPDX-FileCopyrightText: 2022 M. Shulhan <ms@kilabit.info>
## SPDX-License-Identifier: GPL-3.0-or-later
+COVER_OUT=cover.out
+COVER_HTML=cover.html
+
.PHONY: all test
all: test
test:
- CGO_ENABLED=1 go test -race ./...
+ CGO_ENABLED=1 go test -race -coverprofile=$(COVER_OUT) ./...
+ go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)
+ go tool cover -func=$(COVER_OUT) | tail -n1
fieldalignment ./...