mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
Update to the latest rustup release, which (since 1.20.0) installs rustfmt and clippy by default: https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html Also update the Rust toolchain version to 1.42.0 to match the version in the CrOS build environment. Additionally, add workarounds for sysroot of cargo clippy. BUG=None TEST=docker/build_crosvm_base.sh && docker/wrapped_smoke_test.sh TEST=bin/clippy on workstation Change-Id: I7ac4db92f4e5f277d77a77fa3c4ffa880f2ae116 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2150988 Tested-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
22 lines
669 B
Bash
Executable file
22 lines
669 B
Bash
Executable file
#!/bin/bash
|
|
# Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
set -ex
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
cd ../
|
|
|
|
rustup default "$(cat rust-toolchain)"
|
|
rustup component add rustfmt-preview
|
|
cargo --version && rustc --version && rustfmt --version \
|
|
&& cargo clippy --version
|
|
echo "Running cargo test"
|
|
cargo test --no-fail-fast --features plugin,default-no-sandbox,wl-dmabuf,gpu,tpm \
|
|
--all --exclude aarch64 $TEST_FLAGS -- \
|
|
--test-threads=1 $TEST_RUNNER_FLAGS
|
|
echo "Running cargo fmt"
|
|
bin/fmt --check
|
|
echo "Running cargo clippy"
|
|
bin/clippy
|