diff --git a/Makefile b/Makefile index bc834d17e..e80b234c1 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,9 @@ rustdoc: token_lists contracts $(PROOFS_BIN) test: token_lists $(PROOFS_BIN) contracts $(CARGO) test --release --all-features --all +coverage: token_lists contracts $(PROOFS_BIN) + $(CARGO) llvm-cov --release --all-features --workspace --html + cleanbin: rm -f $(BINS) @@ -97,4 +100,4 @@ uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \ done; -.PHONY: all contracts token_lists check fix clippy rustdoc test cleanbin clean install uninstall +.PHONY: all contracts token_lists check fix clippy rustdoc test cleanbin clean install uninstall coverage diff --git a/doc/src/development/development.md b/doc/src/development/development.md index dd97d311b..b51b6d17e 100644 --- a/doc/src/development/development.md +++ b/doc/src/development/development.md @@ -82,3 +82,14 @@ This allows us to coordinate more effectively. Another option is to run your ircd inside a persistant tmux session, and never miss messages. +## Code coverage + +You can run codecov tests of the codebase using +[`cargo-llvm-cov`](https://github.com/taiki-e/cargo-llvm-cov): + +``` +$ cargo install cargo-llvm-cov +$ make coverage +``` + +You can then find the reports in `target/llvm-cov/html/index.html`