blueprint-freespeech / gosling

Rust crate providing anonymous, secure, and private peer-to-peer functionality using Tor onion services
https://gosling.technology
Other
27 stars 8 forks source link

Add test-coverage support to gosling lib #11

Closed morganava closed 1 year ago

morganava commented 2 years ago

richard: hm is there an easy/bultin way to get test coverage stats out of a rust project? richard (we're alreadying using [#test] and [cfg(test)] in gosling) trinity: there is easy way and half builtin way but they are not the same. Cargo-tarpaulin would be the easy way, but has some limitations (can only compute coverage on tests, works only on linux x86_64). The half builtin way is by setting RUSTFLAGS="-C instrument-coverage", which instrument program so they generate raw coverage themselves (that's the builtin part), and process these files with something like grcov (that's the not builtin part). You trinity: can take a look at arti maint/with_coverage, it's a script you put in front of a command to get a coverage report from the command

morganava commented 1 year ago

initial support implemented in 4ed39fe11813fab9a41b85efa82e4f5f772106f7