Skip to content

Commit

Permalink
disable log coverage (#128)
Browse files Browse the repository at this point in the history
* remove logging form coverage

* disable examples
  • Loading branch information
russelltg authored Oct 26, 2021
1 parent d833925 commit dde23fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ jobs:
- name: Download grcov
run: wget https://github.com/mozilla/grcov/releases/download/v0.8.2/grcov-linux-x86_64.tar.bz2 -O grcov.tar.bz2 && tar -xf grcov.tar.bz2
- name: Build with profdata
run: RUSTFLAGS="-Zinstrument-coverage" cargo +nightly-2021-08-07 build --tests
run: RUSTFLAGS="-Zinstrument-coverage" cargo +nightly-2021-08-07 build --tests --features=log_disable
- name: Generate reports
run: RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="srt.%p.profraw" cargo +nightly-2021-08-07 test
run: RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="srt.%p.profraw" cargo +nightly-2021-08-07 test --features=log_disable
- name: Run grcov
run: RUSTUP_TOOLCHAIN=nightly-2021-08-07 ./grcov . --llvm --binary-path ./target/debug/ -t lcov -s . --ignore '*/tests/*' -o lcov.info
run: RUSTUP_TOOLCHAIN=nightly-2021-08-07 ./grcov . --llvm --binary-path ./target/debug/ -t lcov -s . --ignore '*/examples/*' --ignore '*/tests/*' -o lcov.info
- name: Upload results
run: bash <(curl -s https://codecov.io/bash) -f lcov.info
4 changes: 4 additions & 0 deletions srt-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ proptest = "1.0"
hex = "0.4"
rand_distr = "0.4"
pretty_env_logger = { version = "0.4", default-features = false }

[features]
default = []
log_disable = ["log/max_level_off"]
1 change: 1 addition & 0 deletions srt-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ features = ["rt-multi-thread"]

[features]
default = []
log_disable = ["log/max_level_off"]
4 changes: 4 additions & 0 deletions srt-transmit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ features = ["full"]
[dev-dependencies]
rand = "0.8"
tokio-stream = "0.1"

[features]
default = []
log_disable = ["log/max_level_off"]

0 comments on commit dde23fa

Please sign in to comment.