summary refs log tree commit diff
path: root/kokoro
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-10-23 15:08:57 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-25 15:19:02 -0700
commitac699881f26300c7776dff706a567f68a7475582 (patch)
treebc5c01463530d69768906d760b0fcd0b92792402 /kokoro
parent56ec644e094b7a1edf5f88452a0b0dfd8531a2b4 (diff)
downloadcrosvm-ac699881f26300c7776dff706a567f68a7475582.tar
crosvm-ac699881f26300c7776dff706a567f68a7475582.tar.gz
crosvm-ac699881f26300c7776dff706a567f68a7475582.tar.bz2
crosvm-ac699881f26300c7776dff706a567f68a7475582.tar.lz
crosvm-ac699881f26300c7776dff706a567f68a7475582.tar.xz
crosvm-ac699881f26300c7776dff706a567f68a7475582.tar.zst
crosvm-ac699881f26300c7776dff706a567f68a7475582.zip
kokoro: add rustfmt check
Also add the standard Chromium copyright header to make the pre-submit
check happy.

BUG=None
TEST=Run manually with docker and verify it catches incorrect formatting

Change-Id: I85b7736e9efe97e56bde99eee0f23b213d3b7523
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1296984
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'kokoro')
-rw-r--r--kokoro/Dockerfile8
1 files changed, 7 insertions, 1 deletions
diff --git a/kokoro/Dockerfile b/kokoro/Dockerfile
index 2a744b4..742bf3c 100644
--- a/kokoro/Dockerfile
+++ b/kokoro/Dockerfile
@@ -1,3 +1,7 @@
+# Copyright 2018 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.
+
 FROM debian:stretch
 LABEL description="Test crosvm using a command like the following: \
 docker run --privileged -v /dev/log:/dev/log -v <path to crosvm>:/src:ro <crosvm base image>"
@@ -34,6 +38,7 @@ RUN curl -LO "https://static.rust-lang.org/rustup/archive/1.13.0/x86_64-unknown-
     && echo "f69dafcca62fe70d7882113e21bb96a2cbdf4fc4636d25337d6de9191bdec8da *rustup-init" | sha256sum -c - \
     && chmod +x rustup-init \
     && ./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION \
+    && rustup component add rustfmt-preview \
     && rm rustup-init \
     && chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
     && rustup --version \
@@ -93,4 +98,5 @@ ENV CARGO_TARGET_DIR=/build
 RUN mkdir -p $CARGO_TARGET_DIR
 WORKDIR /src
 CMD cargo test --no-fail-fast --all-features --all --exclude aarch64 $TEST_FLAGS -- \
-    --test-threads=1 $TEST_RUNNER_FLAGS
+    --test-threads=1 $TEST_RUNNER_FLAGS && \
+    cargo fmt --all -- --check