Skip to content

Commit 21889d0

Browse files
committed
Fix makefiles so we don't try to test and generate coverage for helpers.
1 parent 536dc6c commit 21889d0

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

store/vault/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
MODULE=vault
22

33
include ./../../tools/tools.mk
4+
5+
# Special handling so we're not generating (non) coverage for our helpers or examples
6+
test:
7+
go test github.com/davepgreene/go-db-credential-refresh/store/vault \
8+
github.com/davepgreene/go-db-credential-refresh/store/vault/auth \
9+
github.com/davepgreene/go-db-credential-refresh/store/vault/credentials \
10+
-count=1 -coverprofile=cover.out

tools/tools.mk

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ else
1414
$(error You must define the GO_BIN variable)
1515
endif
1616

17-
build:
17+
build-default:
1818
go build ./...
1919

20-
test:
20+
test-default:
2121
go test ./... -count=1 -coverprofile=cover.out
2222

23-
bench:
23+
bench-default:
2424
go test ./... -bench -count=1 -coverprofile=cover.out
2525

26-
cover: test
26+
cover-default: test-default
2727
go tool cover -html=cover.out -o "$(GO_BIN)/coverage/$(MODULE).html"
2828

29-
lint:
29+
lint-default:
3030
"$(GO_BIN)/golangci-lint" run ./...
31+
32+
%: %-default
33+
@ true

0 commit comments

Comments
 (0)