Skip to content

Commit

Permalink
chore: update Rust toolchain to v1.81.0 (#605)
Browse files Browse the repository at this point in the history
* chore: update Rust toolchain to v1.81.0

* chore: fix coverage test

* chore: revert probe-rs installation refactor
  • Loading branch information
rjaegers authored Oct 19, 2024
1 parent b8b949b commit 94025e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .devcontainer/rust/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:24.04@sha256:ab64a8382e935382638764d8719362bb50ee418d944c1f3d26e0c99fae49a345

ARG BATS_VERSION=1.11.0
ARG CARGO_BINSTALL_VERSION=1.6.8
ARG RUST_VERSION=1.78.0
ARG CARGO_BINSTALL_VERSION=1.10.8
ARG RUST_VERSION=1.81.0

ARG DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -43,8 +43,9 @@ RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
RUN update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-13 20 \
&& cp /etc/skel/.bashrc /root/.bashrc

ENV BINSTALL_DISABLE_TELEMETRY=true
# Install additional rust tools
RUN wget -qO - "https://github.com/cargo-bins/cargo-binstall/releases/download/v${CARGO_BINSTALL_VERSION}/cargo-binstall-$(uname -m)-unknown-linux-gnu.tgz" | tar xz -C "/usr/bin" \
&& cargo-binstall -y --locked cargo-binutils@0.3.6 cargo-mutants@24.5.0 flip-link@0.1.8 \
&& cargo-binstall -y --locked cargo-binutils@0.3.6 cargo-mutants@24.9.0 flip-link@0.1.9 \
# cargo-binstall can't (yet) install probe-rs-tools for aarch64, fall-back to script installation
&& wget -qO - https://github.com/probe-rs/probe-rs/releases/download/v0.24.0/probe-rs-tools-installer.sh | sh
4 changes: 2 additions & 2 deletions .devcontainer/rust/test/testsuite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ EOF

@test "coverage information should be generated when running a testsuite" {
pushd test

RUSTFLAGS="-C instrument-coverage" run cargo test
assert_success
assert_output --partial "test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out;"

cargo profdata -- merge -sparse default_*.profraw -o default.profdata

run cargo cov -- report --instr-profile=default.profdata --object target/debug/deps/test-39ae9a37530d18ea
run cargo cov -- report --instr-profile=default.profdata --object target/debug/deps/test-79ff237e4a2ee06d
assert_success
assert_output --partial "77.78%"

Expand Down

0 comments on commit 94025e9

Please sign in to comment.