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 <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1470914
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Daniel Verkamp 2019-02-13 15:54:36 -08:00 committed by chrome-bot
parent a446434855
commit 05259303e4

View file

@ -124,7 +124,9 @@ RUN git clone https://chromium.googlesource.com/chromiumos/third_party/adhd $THI
ENV CARGO_TARGET_DIR=/build ENV CARGO_TARGET_DIR=/build
RUN mkdir -p $CARGO_TARGET_DIR RUN mkdir -p $CARGO_TARGET_DIR
WORKDIR /platform/crosvm 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" && \ echo "Running cargo test" && \
cargo test --no-fail-fast --all-features --all --exclude aarch64 $TEST_FLAGS -- \ cargo test --no-fail-fast --all-features --all --exclude aarch64 $TEST_FLAGS -- \
--test-threads=1 $TEST_RUNNER_FLAGS && \ --test-threads=1 $TEST_RUNNER_FLAGS && \