From 05259303e4e8de2bf18ceac4884cd5e6a5065433 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 13 Feb 2019 15:54:36 -0800 Subject: [PATCH] kokoro: use version specified in rust-toolchain Update the default Rust toolchain to the version specified in the rust-toolchain file (which is part of the crosvm source directory, not baked into the Docker image) during each kokoro run. This will let us seamlessly update rust-toolchain without breaking the builds using the existing kokoro Docker image once this change is in place. BUG=None TEST=Build image with 1.31.0, then run test with rust-toolchain 1.32.0 Change-Id: If4f6dffc20af33011d2a96a0cf6b3db3582a2fd0 Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/1470914 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: kokoro Reviewed-by: David Tolnay Reviewed-by: Zach Reizner --- kokoro/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kokoro/Dockerfile b/kokoro/Dockerfile index 43fa5088df..b3f42ef245 100644 --- a/kokoro/Dockerfile +++ b/kokoro/Dockerfile @@ -124,7 +124,9 @@ RUN git clone https://chromium.googlesource.com/chromiumos/third_party/adhd $THI ENV CARGO_TARGET_DIR=/build RUN mkdir -p $CARGO_TARGET_DIR WORKDIR /platform/crosvm -CMD cargo --version && rustc --version && rustfmt --version && \ +CMD rustup default "$(cat rust-toolchain)" && \ + rustup component add rustfmt-preview && \ + cargo --version && rustc --version && rustfmt --version && \ echo "Running cargo test" && \ cargo test --no-fail-fast --all-features --all --exclude aarch64 $TEST_FLAGS -- \ --test-threads=1 $TEST_RUNNER_FLAGS && \