Skip to content

Commit 09ba8fb

Browse files
authored
Rollup merge of rust-lang#52004 - kennytm:toolstate-fixes, r=Mark-Simulacrum
toolstate: Fixed detection of changed submodule, and other fixes. 1. Make sure that if a submodule is updated but failed to test-pass, we'll block the merge. 2. Make sure failure on external docs (nomicon/RBE/etc) are properly checked. 3. If the commit message starts with "Update RLS" (or clippy etc), automatically run the "tools" job on the PR, so that we could know if the update failed before merging.
2 parents ef356d6 + 689cffa commit 09ba8fb

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ matrix:
169169
- env: IMAGE=x86_64-gnu-aux
170170
if: branch = auto
171171
- env: IMAGE=x86_64-gnu-tools
172-
if: branch = auto
172+
if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri)\b)/)
173173
- env: IMAGE=x86_64-gnu-debug
174174
if: branch = auto
175175
- env: IMAGE=x86_64-gnu-nopt

src/bootstrap/test.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -1269,17 +1269,15 @@ impl Step for DocTest {
12691269

12701270
files.sort();
12711271

1272+
let mut toolstate = ToolState::TestPass;
12721273
for file in files {
1273-
let test_result = markdown_test(builder, compiler, &file);
1274-
if self.is_ext_doc {
1275-
let toolstate = if test_result {
1276-
ToolState::TestPass
1277-
} else {
1278-
ToolState::TestFail
1279-
};
1280-
builder.save_toolstate(self.name, toolstate);
1274+
if !markdown_test(builder, compiler, &file) {
1275+
toolstate = ToolState::TestFail;
12811276
}
12821277
}
1278+
if self.is_ext_doc {
1279+
builder.save_toolstate(self.name, toolstate);
1280+
}
12831281
}
12841282
}
12851283

src/ci/docker/x86_64-gnu-tools/checktools.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ status_check() {
7979
check_dispatch $1 beta nomicon src/doc/nomicon
8080
check_dispatch $1 beta reference src/doc/reference
8181
check_dispatch $1 beta rust-by-example src/doc/rust-by-example
82-
check_dispatch $1 beta rls src/tool/rls
83-
check_dispatch $1 beta rustfmt src/tool/rustfmt
82+
check_dispatch $1 beta rls src/tools/rls
83+
check_dispatch $1 beta rustfmt src/tools/rustfmt
8484
# these tools are not required for beta to successfully branch
85-
check_dispatch $1 nightly clippy-driver src/tool/clippy
86-
check_dispatch $1 nightly miri src/tool/miri
85+
check_dispatch $1 nightly clippy-driver src/tools/clippy
86+
check_dispatch $1 nightly miri src/tools/miri
8787
}
8888

8989
# If this PR is intended to update one of these tools, do not let the build pass

0 commit comments

Comments
 (0)