Skip to content

Commit 0c0b606

Browse files
committed
Replace cargo-kcov with llvm-cov
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]>
1 parent 7929a29 commit 0c0b606

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build_container.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAI
2424
# Use `git` executable to avoid OOM on arm64:
2525
# https://github.com/rust-lang/cargo/issues/10583#issuecomment-1129997984
2626
cargo --config "net.git-fetch-with-cli = true" \
27-
install cargo-kcov critcmp cargo-audit cargo-fuzz
27+
install critcmp cargo-audit cargo-fuzz
2828
rm -rf /root/.cargo/registry/
2929

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

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

37-
# Install kcov.
38-
cargo kcov --print-install-kcov-sh | sh
38+
cargo install cargo-llvm-cov
3939

4040
# Install libgpiod (required by vhost-device crate)
4141
pushd /opt

0 commit comments

Comments
 (0)