Skip to content

Commit 9e3f784

Browse files
committed
Auto merge of rust-lang#116932 - Kobzol:fix-stage1-tests, r=Mark-Simulacrum
Fix x86_64-gnu-llvm-15 CI tests The CI script was broken - if there was a test failure in the first command chain (inside the `if`), CI would not report the failure. It happened because there were two command chains separated by `&&` in the script, and since `set -e` doesn't exit for chained commands, if the first chain has failed, the script would happily continue forward, ignoring any test failures. This could be fixed e.g. by adding some `|| exit 1` to the first chain, but I suppose that the `&&` chaining is unnecessary here anyway. Reported [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/test.20failure.20didn't.20stop.20CI). Fixes: rust-lang#116867
2 parents 97a2894 + c2524bc commit 9e3f784

File tree

3 files changed

+32
-30
lines changed

3 files changed

+32
-30
lines changed

src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh

+28-28
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ set -ex
44

55
# Only run the stage 1 tests on merges, not on PR CI jobs.
66
if [[ -z "${PR_CI_JOB}" ]]; then
7-
../x.py --stage 1 test --skip src/tools/tidy && \
8-
# Run the `mir-opt` tests again but this time for a 32-bit target.
9-
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
10-
# both 32-bit and 64-bit outputs updated by the PR author, before
11-
# the PR is approved and tested for merging.
12-
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
13-
# despite having different output on 32-bit vs 64-bit targets.
14-
../x.py --stage 1 test tests/mir-opt \
15-
--host='' --target=i686-unknown-linux-gnu && \
16-
# Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0
17-
# compiler, and is sensitive to the addition of new flags.
18-
../x.py --stage 1 test tests/ui-fulldeps
7+
../x.py --stage 1 test --skip src/tools/tidy
8+
9+
# Run the `mir-opt` tests again but this time for a 32-bit target.
10+
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
11+
# both 32-bit and 64-bit outputs updated by the PR author, before
12+
# the PR is approved and tested for merging.
13+
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
14+
# despite having different output on 32-bit vs 64-bit targets.
15+
../x.py --stage 1 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu
16+
17+
# Run `ui-fulldeps` in `--stage=1`, which actually uses the stage0
18+
# compiler, and is sensitive to the addition of new flags.
19+
../x.py --stage 1 test tests/ui-fulldeps
1920
fi
2021

2122
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
22-
../x.py --stage 2 test --skip src/tools/tidy && \
23-
# Run the `mir-opt` tests again but this time for a 32-bit target.
24-
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
25-
# both 32-bit and 64-bit outputs updated by the PR author, before
26-
# the PR is approved and tested for merging.
27-
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
28-
# despite having different output on 32-bit vs 64-bit targets.
29-
../x --stage 2 test tests/mir-opt \
30-
--host='' --target=i686-unknown-linux-gnu && \
31-
# Run the UI test suite again, but in `--pass=check` mode
32-
#
33-
# This is intended to make sure that both `--pass=check` continues to
34-
# work.
35-
#
36-
../x.ps1 --stage 2 test tests/ui --pass=check \
37-
--host='' --target=i686-unknown-linux-gnu
23+
../x.py --stage 2 test --skip src/tools/tidy
24+
25+
# Run the `mir-opt` tests again but this time for a 32-bit target.
26+
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
27+
# both 32-bit and 64-bit outputs updated by the PR author, before
28+
# the PR is approved and tested for merging.
29+
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
30+
# despite having different output on 32-bit vs 64-bit targets.
31+
../x --stage 2 test tests/mir-opt --host='' --target=i686-unknown-linux-gnu
32+
33+
# Run the UI test suite again, but in `--pass=check` mode
34+
#
35+
# This is intended to make sure that both `--pass=check` continues to
36+
# work.
37+
../x.ps1 --stage 2 test tests/ui --pass=check --host='' --target=i686-unknown-linux-gnu

tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Test the `rustc::span_use_eq_ctxt` internal lint
2+
// #[cfg(bootstrap)]
3+
// ignore-stage1
24
// compile-flags: -Z unstable-options
35

46
#![feature(rustc_private)]

tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
2-
--> $DIR/span_use_eq_ctxt.rs:12:5
2+
--> $DIR/span_use_eq_ctxt.rs:14:5
33
|
44
LL | s.ctxt() == t.ctxt()
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
77
note: the lint level is defined here
8-
--> $DIR/span_use_eq_ctxt.rs:5:9
8+
--> $DIR/span_use_eq_ctxt.rs:7:9
99
|
1010
LL | #![deny(rustc::span_use_eq_ctxt)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)