Skip to content

Commit 1839645

Browse files
committed
Update the tools CI to use --no-fail-fast and --save-toolstates.
1 parent 971b1ba commit 1839645

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

appveyor.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@ environment:
2727

2828
# MSVC tools tests
2929
- MSYS_BITS: 64
30-
SCRIPT: >
31-
python x.py test --no-fail-fast
32-
src/tools/rls
33-
src/tools/rustfmt
34-
src/tools/miri
35-
src/tools/clippy
36-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
30+
SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py toolstates.json
31+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=toolstates.json
3732

3833
# 32/64-bit MinGW builds.
3934
#

src/ci/docker/x86_64-gnu-tools/Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
COPY scripts/sccache.sh /scripts/
1818
RUN sh /scripts/sccache.sh
1919

20-
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
21-
ENV SCRIPT python2.7 ../x.py --no-fail-fast \
22-
src/tools/rls \
23-
src/tools/rustfmt \
24-
src/tools/miri \
25-
src/tools/clippy
20+
COPY x86_64-gnu-tools/checktools.sh /tmp/
21+
22+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --save-toolstates=/tmp/toolstates.json
23+
ENV SCRIPT /tmp/checktools.sh ../x.py /tmp/toolstates.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh
2+
3+
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
4+
# file at the top-level directory of this distribution and at
5+
# http://rust-lang.org/COPYRIGHT.
6+
#
7+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10+
# option. This file may not be copied, modified, or distributed
11+
# except according to those terms.
12+
13+
set -eu
14+
15+
X_PY="$1"
16+
TOOLSTATE_FILE="$2"
17+
18+
touch "$TOOLSTATE_FILE"
19+
20+
set +e
21+
python2.7 "$X_PY" test --no-fail-fast \
22+
src/tools/rls \
23+
src/tools/rustfmt \
24+
src/tools/miri \
25+
src/tools/clippy
26+
TEST_RESULT=$?
27+
set -e
28+
29+
# FIXME: Upload this file to the repository.
30+
cat "$TOOLSTATE_FILE"
31+
32+
# FIXME: After we can properly inform dev-tool maintainers about failure,
33+
# comment out the `exit 0` below.
34+
if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then
35+
# exit 0
36+
true
37+
fi
38+
39+
exit $TEST_RESULT

src/ci/run.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ fi
4242
#
4343
# FIXME: need a scheme for changing this `nightly` value to `beta` and `stable`
4444
# either automatically or manually.
45+
export RUST_RELEASE_CHANNEL=nightly
4546
if [ "$DEPLOY$DEPLOY_ALT" != "" ]; then
46-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=nightly"
47+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL"
4748
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp"
4849

4950
if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then

0 commit comments

Comments
 (0)