diff --git a/.gitignore b/.gitignore index 9dba8ee04e..d53a2695bd 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ coverage coverage.json coverage.out +coverage.html node_modules release/ typechain diff --git a/Makefile b/Makefile index f58f52b8af..38523c20cd 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ TEST_DIR?="./..." TEST_BUILD_FLAGS := -tags TESTNET,pebbledb,ledger PRIV_BUILD_FLAGS := -tags PRIVNET,pebbledb,ledger -clean: clean-binaries clean-dir clean-test-dir +clean: clean-binaries clean-dir clean-test-dir clean-coverage clean-binaries: @rm -rf ${GOBIN}/zetacored @@ -39,13 +39,18 @@ clean-dir: all: install test-coverage-exclude-core: - @go test {TEST_BUILD_FLAGS} -v -coverprofile coverage.out $(go list ./... | grep -v /x/zetacore/) + @go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out $(go list ./... | grep -v /x/zetacore/) test-coverage: - @go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out ${TEST_DIR} + -@go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out ${TEST_DIR} coverage-report: test-coverage - @go tool cover -html=cover.txt + @go tool cover -html=coverage.out -o coverage.html + +clean-coverage: + @rm -f coverage.out + @rm -f coverage.html + clean-test-dir: @rm -rf x/crosschain/client/integrationtests/.zetacored @rm -rf x/crosschain/client/querytests/.zetacored