Skip to content

Commit

Permalink
Update Mafile for go test
Browse files Browse the repository at this point in the history
  • Loading branch information
ganglyu committed Jun 18, 2022
1 parent 46ae5b1 commit 6e33aa1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ ifeq ($(wildcard ${DBDIR}/database_config.json),)
sudo mkdir -p ${DBDIR}
sudo cp ./testdata/database_config.json ${DBDIR}
endif
cd ./gnmi_server && sudo $(GO) test -coverprofile=coverage-gnmi.txt -covermode=atomic -mod=vendor -coverpkg ./,../sonic_data_client
sudo $(GO) test -coverprofile=coverage-gnmi.txt -covermode=atomic -mod=vendor -v github.com/sonic-net/sonic-gnmi/gnmi_server -coverpkg ../...
$(GO) get github.com/axw/gocov/...
$(GO) get github.com/AlekSi/gocov-xml
gocov convert ./gnmi_server/coverage-gnmi.txt | gocov-xml -source $(shell pwd) > coverage.xml
rm -rf ./gnmi_server/coverage-gnmi.txt
gocov convert coverage-*.txt | gocov-xml -source $(shell pwd) > coverage.xml
rm -rf coverage-*.txt
endif

clean:
Expand Down

0 comments on commit 6e33aa1

Please sign in to comment.