We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bf6752 commit 2bb8e60Copy full SHA for 2bb8e60
Makefile
@@ -0,0 +1,21 @@
1
+# general
2
+WORKDIR = $(PWD)
3
+
4
+# coverage
5
+COVERAGE_REPORT = coverage.txt
6
+COVERAGE_PROFILE = profile.out
7
+COVERAGE_MODE = atomic
8
9
+coverage:
10
+ @cd $(WORKDIR); \
11
+ echo "" > $(COVERAGE_REPORT); \
12
+ for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \
13
+ go test -v -race $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \
14
+ if [ $$? != 0 ]; then \
15
+ exit 2; \
16
+ fi; \
17
+ if [ -f $(COVERAGE_PROFILE) ]; then \
18
+ cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \
19
+ rm $(COVERAGE_PROFILE); \
20
21
+ done; \
0 commit comments