From 183964505bf6775c90da5d034cc8951cd46d7c10 Mon Sep 17 00:00:00 2001 From: kennytm Date: Thu, 30 Nov 2017 18:21:11 +0800 Subject: Update the tools CI to use --no-fail-fast and --save-toolstates. --- src/ci/docker/x86_64-gnu-tools/Dockerfile | 10 +++---- src/ci/docker/x86_64-gnu-tools/checktools.sh | 39 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100755 src/ci/docker/x86_64-gnu-tools/checktools.sh (limited to 'src/ci/docker') diff --git a/src/ci/docker/x86_64-gnu-tools/Dockerfile b/src/ci/docker/x86_64-gnu-tools/Dockerfile index f4ba58e536f..fffad1c42df 100644 --- a/src/ci/docker/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/x86_64-gnu-tools/Dockerfile @@ -17,9 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu -ENV SCRIPT python2.7 ../x.py --no-fail-fast \ - src/tools/rls \ - src/tools/rustfmt \ - src/tools/miri \ - src/tools/clippy +COPY x86_64-gnu-tools/checktools.sh /tmp/ + +ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --save-toolstates=/tmp/toolstates.json +ENV SCRIPT /tmp/checktools.sh ../x.py /tmp/toolstates.json diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/x86_64-gnu-tools/checktools.sh new file mode 100755 index 00000000000..bf39bc28a67 --- /dev/null +++ b/src/ci/docker/x86_64-gnu-tools/checktools.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Copyright 2017 The Rust Project Developers. See the COPYRIGHT +# file at the top-level directory of this distribution and at +# http://rust-lang.org/COPYRIGHT. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -eu + +X_PY="$1" +TOOLSTATE_FILE="$2" + +touch "$TOOLSTATE_FILE" + +set +e +python2.7 "$X_PY" test --no-fail-fast \ + src/tools/rls \ + src/tools/rustfmt \ + src/tools/miri \ + src/tools/clippy +TEST_RESULT=$? +set -e + +# FIXME: Upload this file to the repository. +cat "$TOOLSTATE_FILE" + +# FIXME: After we can properly inform dev-tool maintainers about failure, +# comment out the `exit 0` below. +if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then + # exit 0 + true +fi + +exit $TEST_RESULT -- cgit 1.4.1-3-g733a5