|
1 | 1 |
|
2 | | -CC_TEST_REPORTER_ID := c09efa7c67c269bfdc6f8a356785d8f7ed55c9dc2b9a1d07b78c384f55c4e527 |
3 | | -GO_HTML_COV := ./coverage.html |
4 | | -GO_TEST_OUTFILE := ./c.out |
5 | 2 | CC_PREFIX := github.com/waku-org/go-waku |
6 | 3 |
|
7 | 4 | SHELL := bash # the shell used internally by Make |
8 | 5 |
|
9 | 6 | GOCMD ?= $(shell which go) |
10 | 7 |
|
11 | | -.PHONY: all build lint lint-full test coverage build-example static-library dynamic-library test-c test-c-template mobile-android mobile-ios |
| 8 | +.PHONY: all build lint lint-full test build-example static-library dynamic-library test-c test-c-template mobile-android mobile-ios |
12 | 9 |
|
13 | 10 | ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10... |
14 | 11 | detected_OS := Windows |
@@ -87,31 +84,13 @@ test-with-race: |
87 | 84 | ${GOCMD} test -race -timeout 300s ./waku/... ./cmd/waku/server/... |
88 | 85 |
|
89 | 86 | test: |
90 | | - ${GOCMD} test -timeout 300s ./waku/... ./cmd/waku/server/... -coverprofile=${GO_TEST_OUTFILE}.tmp -coverpkg ./... |
91 | | - cat ${GO_TEST_OUTFILE}.tmp | grep -v ".pb.go" > ${GO_TEST_OUTFILE} |
92 | | - ${GOCMD} tool cover -html=${GO_TEST_OUTFILE} -o ${GO_HTML_COV} |
| 87 | + ${GOCMD} test -timeout 300s ./waku/... ./cmd/waku/server/... ./... |
93 | 88 |
|
94 | | -COVERAGE_FILE := ./coverage/cc-test-reporter |
95 | | -$(COVERAGE_FILE): |
96 | | - curl -sfL $(TEST_REPORTER_URL) --output ./coverage/cc-test-reporter #TODO: Support windows |
97 | | - chmod +x ./coverage/cc-test-reporter |
98 | | - |
99 | | -_before-cc: $(COVERAGE_FILE) |
100 | | - |
101 | | - CC_TEST_REPORTER_ID=${CC_TEST_REPORTER_ID} ./coverage/cc-test-reporter before-build |
102 | | - |
103 | | -_after-cc: |
104 | | - GIT_COMMIT=$(git log | grep -m1 -oE '[^ ]+$') CC_TEST_REPORTER_ID=${CC_TEST_REPORTER_ID} ./coverage/cc-test-reporter after-build --prefix ${CC_PREFIX} |
105 | | - |
106 | | -test-ci: _before-cc test _after-cc |
| 89 | +test-ci: test |
107 | 90 |
|
108 | 91 | generate: |
109 | 92 | ${GOCMD} generate ./... |
110 | 93 |
|
111 | | -coverage: |
112 | | - ${GOCMD} test -count 1 -coverprofile=coverage.out ./... |
113 | | - ${GOCMD} tool cover -html=coverage.out -o=coverage.html |
114 | | - |
115 | 94 | # build a docker image for the fleet |
116 | 95 | docker-image: DOCKER_IMAGE_TAG ?= latest |
117 | 96 | docker-image: DOCKER_IMAGE_NAME ?= wakuorg/go-waku:$(DOCKER_IMAGE_TAG) |
|
0 commit comments