Skip to content

Commit

Permalink
chore(coverage): test coverage statistics
Browse files Browse the repository at this point in the history
单元测试覆盖率统计

Log: 单元测试覆盖率统计
Change-Id: I8eb8c4d66d5e86e905c129458e1fef1a8b91c65a
  • Loading branch information
hubenchang0515 committed Nov 27, 2020
1 parent b77c844 commit 7ccd609
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ gopath/

a.out
misc/polkit-action/*.policy
coverage.csv
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ build: prepare out/bin/default-terminal out/bin/default-file-manager out/bin/des
test: prepare
env GOPATH="${CURDIR}/${GOPATH_DIR}:${GOPATH}" go test -v ./...

test-coverage: prepare
env GOPATH="${CURDIR}/${GOPATH_DIR}:${GOPATH}" go test -cover -v ./... | awk '$$2 ~ "_${CURDIR}" {print $$2","$$5}' | sed "s:${CURDIR}::g" | sed 's/files\]/0\.0%/g' > coverage.csv

print_gopath: prepare
GOPATH="${CURDIR}/${GOPATH_DIR}:${GOPATH}"

Expand Down

0 comments on commit 7ccd609

Please sign in to comment.