forked from rexray/rexray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodecov.mk
26 lines (19 loc) · 849 Bytes
/
codecov.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
################################################################################
## COVERAGE ##
################################################################################
coverage.out: $(TEST_FRAMEWORK_COVR) $(TEST_DRIVERS_COVR)
printf "mode: set\n" > $@
$(foreach f,$?,grep -v "mode: set" $f >> $@ &&) true
clean-coverage:
rm -f coverage.out
# add clean-coverage as a dependency of clean
clean: clean-coverage
COVERAGE_IMPORTS := github.com/onsi/gomega \
github.com/onsi/ginkgo \
golang.org/x/tools/cmd/cover
COVERAGE_IMPORTS_PATHS := $(addprefix $(GOPATH)/src/,$(COVERAGE_IMPORTS))
$(COVERAGE_IMPORTS_PATHS):
go get $(subst $(GOPATH)/src/,,$@)
cover: coverage.out | $(COVERAGE_IMPORTS_PATHS)
curl -sSL https://codecov.io/bash | bash -s -- -f $<
.PHONY: cover