Просмотр исходного кода

book/development: Add note on codecov.

parazyd 3 лет назад
Родитель
Сommit
bd13d9fa9b
2 измененных файлов с 15 добавлено и 1 удалено
  1. 4 1
      Makefile
  2. 11 0
      doc/src/development/development.md

+ 4 - 1
Makefile

@@ -72,6 +72,9 @@ rustdoc: token_lists contracts $(PROOFS_BIN)
 test: token_lists $(PROOFS_BIN) contracts
 test: token_lists $(PROOFS_BIN) contracts
 	$(CARGO) test --release --all-features --all
 	$(CARGO) test --release --all-features --all
 
 
+coverage: token_lists contracts $(PROOFS_BIN)
+	$(CARGO) llvm-cov --release --all-features --workspace --html
+
 cleanbin:
 cleanbin:
 	rm -f $(BINS)
 	rm -f $(BINS)
 
 
@@ -97,4 +100,4 @@ uninstall:
 		rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
 		rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
 	done;
 	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

+ 11 - 0
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.
 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`