From 17f3854a9ce272d4f029e3f998da8f35647e296f Mon Sep 17 00:00:00 2001 From: jsimons Date: Tue, 10 Dec 2019 11:12:20 +0000 Subject: [PATCH] Add flag for outputting coverage to unit test target in Makefile Output coverage when running unit tests using the Makefile by setting the coverage flag. The coverage is stored and can be read by Sonar. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec923c2..3ce48f5 100644 --- a/Makefile +++ b/Makefile @@ -19,4 +19,4 @@ test: test-unit .PHONY: test-unit test-unit: - go test $(TESTS) -run 'Unit' + go test $(TESTS) -run 'Unit' -coverprofile=coverage.out