@@ -25,6 +25,7 @@ python2.7 "$X_PY" test --no-fail-fast \
2525 src/doc/rust-by-example \
2626 src/doc/embedded-book \
2727 src/doc/edition-guide \
28+ src/doc/rustc-guide \
2829 src/tools/clippy \
2930 src/tools/rls \
3031 src/tools/rustfmt \
@@ -41,7 +42,7 @@ check_tool_failed() {
4142}
4243
4344# This function checks that if a tool's submodule changed, the tool's state must improve
44- verify_status () {
45+ verify_submodule_changed () {
4546 echo " Verifying status of $1 ..."
4647 if echo " $CHANGED_FILES " | grep -q " ^M[[:blank:]]$2 $" ; then
4748 echo " This PR updated '$2 ', verifying if status is 'test-pass'..."
@@ -66,7 +67,7 @@ verify_status() {
6667check_dispatch () {
6768 if [ " $1 " = submodule_changed ]; then
6869 # ignore $2 (branch id)
69- verify_status $3 $4
70+ verify_submodule_changed $3 $4
7071 elif [ " $2 " = beta ]; then
7172 echo " Requiring test passing for $3 ..."
7273 if check_tool_failed " $3 " ; then
@@ -75,7 +76,12 @@ check_dispatch() {
7576 fi
7677}
7778
78- # list all tools here
79+ # List all tools here.
80+ # This function gets called with "submodule_changed" for each PR that changed a submodule,
81+ # and with "beta_required" for each PR that lands on beta/stable.
82+ # The purpose of this function is to *reject* PRs if a tool is not "test-pass" and
83+ # (a) the tool's submodule has been updated, or (b) we landed on beta/stable and the
84+ # tool has to "test-pass" on that branch.
7985status_check () {
8086 check_dispatch $1 beta book src/doc/book
8187 check_dispatch $1 beta nomicon src/doc/nomicon
@@ -85,7 +91,10 @@ status_check() {
8591 check_dispatch $1 beta rls src/tools/rls
8692 check_dispatch $1 beta rustfmt src/tools/rustfmt
8793 check_dispatch $1 beta clippy-driver src/tools/clippy
88- # these tools are not required for beta to successfully branch
94+ # These tools are not required on the beta/stable branches, but they *do* cause
95+ # PRs to fail if a submodule update does not fix them.
96+ # They will still cause failure during the beta cutoff week, unless `checkregression.py`
97+ # exempts them from that.
8998 check_dispatch $1 nightly miri src/tools/miri
9099 check_dispatch $1 nightly embedded-book src/doc/embedded-book
91100 check_dispatch $1 nightly rustc-guide src/doc/rustc-guide
@@ -97,12 +106,14 @@ status_check() {
97106status_check " submodule_changed"
98107
99108CHECK_NOT=" $( readlink -f " $( dirname $0 ) /checkregression.py" ) "
109+ # This callback is called by `commit_toolstate_change`, see `repo.sh`.
100110change_toolstate () {
101111 # only update the history
102112 if python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" changed; then
103113 echo ' Toolstate is not changed. Not updating.'
104114 else
105115 if [ $SIX_WEEK_CYCLE -ge 35 ]; then
116+ # Reject any regressions during the week before beta cutoff.
106117 python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" regressed
107118 fi
108119 sed -i " 1 a\\
0 commit comments