Skip to content

Commit

Permalink
Replace cargo-kcov with llvm-cov
Browse files Browse the repository at this point in the history
cargo-kcov is no longer working as of rust toolchain version 1.71.0, as
it can no longer discover test executables. This is due to cargo
changing its verbose stdout printing to include the qualified path to
rustc, which causes cargo-kcov's string matching to fail.

See also kennytm/cargo-kcov#54

cargo-kcov has had its last commit in 2019, so replace it with
cargo-llvm-cov, which is actively maintained, and written for rust.

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat authored and stefano-garzarella committed Aug 30, 2023
1 parent 7929a29 commit 9347c52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAI
# Use `git` executable to avoid OOM on arm64:
# https://github.com/rust-lang/cargo/issues/10583#issuecomment-1129997984
cargo --config "net.git-fetch-with-cli = true" \
install cargo-kcov critcmp cargo-audit cargo-fuzz
install critcmp cargo-audit cargo-fuzz
rm -rf /root/.cargo/registry/

# Install nightly (needed for fuzzing)
rustup install --profile=minimal nightly
rustup component add miri rust-src --toolchain nightly
rustup component add llvm-tools-preview # needed for coverage

# Install other rust targets.
rustup target add $(uname -m)-unknown-linux-musl

# Install kcov.
cargo kcov --print-install-kcov-sh | sh
cargo install cargo-llvm-cov

# Install libgpiod (required by vhost-device crate)
pushd /opt
Expand Down

0 comments on commit 9347c52

Please sign in to comment.