Skip to content

Commit 481bf0f

Browse files
committed
Run tests so that coverage profiles don't need to be manually concatenated
Addresses: #2
1 parent 9f6c7e5 commit 481bf0f

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

Makefile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,14 @@ test-short:
2727
test:
2828
@-rm -r $(COVERAGE_DIR)
2929
@mkdir $(COVERAGE_DIR)
30-
make test-with-flags TEST_FLAGS='-v -race -covermode atomic -coverprofile $$(COVERAGE_DIR)/_$$(RAND).txt -bench=. -benchmem -timeout 20m'
31-
@echo 'mode: atomic' > $(COVERAGE_DIR)/combined.txt
32-
@cat $(COVERAGE_DIR)/_*.txt | grep -v 'mode: atomic' >> $(COVERAGE_DIR)/combined.txt
30+
make test-with-flags TEST_FLAGS='-v -race -covermode atomic -coverprofile $$(COVERAGE_DIR)/combined.txt -bench=. -benchmem -timeout 20m'
3331

3432

3533
test-with-flags:
3634
@echo SOURCE: $(SOURCE)
3735
@echo DATABASE: $(DATABASE)
3836

39-
@go test $(TEST_FLAGS) .
40-
@go test $(TEST_FLAGS) ./cli/...
41-
@go test $(TEST_FLAGS) ./database
42-
@go test $(TEST_FLAGS) ./testing/...
43-
44-
@echo -n '$(SOURCE)' | tr -s ' ' '\n' | xargs -I{} go test $(TEST_FLAGS) ./source/{}
45-
@go test $(TEST_FLAGS) ./source/testing/...
46-
@go test $(TEST_FLAGS) ./source/stub/...
47-
48-
@echo -n '$(DATABASE)' | tr -s ' ' '\n' | xargs -I{} go test $(TEST_FLAGS) ./database/{}
49-
@go test $(TEST_FLAGS) ./database/testing/...
50-
@go test $(TEST_FLAGS) ./database/stub/...
37+
@go test $(TEST_FLAGS) ./...
5138

5239

5340
kill-orphaned-docker-containers:

0 commit comments

Comments
 (0)