diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bcff2224..7b147562 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 \ No newline at end of file diff --git a/srt-protocol/Cargo.toml b/srt-protocol/Cargo.toml index 32333055..1ab1910b 100644 --- a/srt-protocol/Cargo.toml +++ b/srt-protocol/Cargo.toml @@ -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"] \ No newline at end of file diff --git a/srt-tokio/Cargo.toml b/srt-tokio/Cargo.toml index 289b2ca9..6400831e 100644 --- a/srt-tokio/Cargo.toml +++ b/srt-tokio/Cargo.toml @@ -39,3 +39,4 @@ features = ["rt-multi-thread"] [features] default = [] +log_disable = ["log/max_level_off"] diff --git a/srt-transmit/Cargo.toml b/srt-transmit/Cargo.toml index a9d045b4..e6f223f7 100644 --- a/srt-transmit/Cargo.toml +++ b/srt-transmit/Cargo.toml @@ -32,3 +32,7 @@ features = ["full"] [dev-dependencies] rand = "0.8" tokio-stream = "0.1" + +[features] +default = [] +log_disable = ["log/max_level_off"]