@@ -25,6 +25,7 @@ python2.7 "$X_PY" test --no-fail-fast \
25
25
src/doc/rust-by-example \
26
26
src/doc/embedded-book \
27
27
src/doc/edition-guide \
28
+ src/doc/rustc-guide \
28
29
src/tools/clippy \
29
30
src/tools/rls \
30
31
src/tools/rustfmt \
@@ -41,7 +42,7 @@ check_tool_failed() {
41
42
}
42
43
43
44
# This function checks that if a tool's submodule changed, the tool's state must improve
44
- verify_status () {
45
+ verify_submodule_changed () {
45
46
echo " Verifying status of $1 ..."
46
47
if echo " $CHANGED_FILES " | grep -q " ^M[[:blank:]]$2 $" ; then
47
48
echo " This PR updated '$2 ', verifying if status is 'test-pass'..."
@@ -66,7 +67,7 @@ verify_status() {
66
67
check_dispatch () {
67
68
if [ " $1 " = submodule_changed ]; then
68
69
# ignore $2 (branch id)
69
- verify_status $3 $4
70
+ verify_submodule_changed $3 $4
70
71
elif [ " $2 " = beta ]; then
71
72
echo " Requiring test passing for $3 ..."
72
73
if check_tool_failed " $3 " ; then
@@ -75,7 +76,12 @@ check_dispatch() {
75
76
fi
76
77
}
77
78
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.
79
85
status_check () {
80
86
check_dispatch $1 beta book src/doc/book
81
87
check_dispatch $1 beta nomicon src/doc/nomicon
@@ -85,7 +91,10 @@ status_check() {
85
91
check_dispatch $1 beta rls src/tools/rls
86
92
check_dispatch $1 beta rustfmt src/tools/rustfmt
87
93
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.
89
98
check_dispatch $1 nightly miri src/tools/miri
90
99
check_dispatch $1 nightly embedded-book src/doc/embedded-book
91
100
check_dispatch $1 nightly rustc-guide src/doc/rustc-guide
@@ -97,12 +106,14 @@ status_check() {
97
106
status_check " submodule_changed"
98
107
99
108
CHECK_NOT=" $( readlink -f " $( dirname $0 ) /checkregression.py" ) "
109
+ # This callback is called by `commit_toolstate_change`, see `repo.sh`.
100
110
change_toolstate () {
101
111
# only update the history
102
112
if python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" changed; then
103
113
echo ' Toolstate is not changed. Not updating.'
104
114
else
105
115
if [ $SIX_WEEK_CYCLE -ge 35 ]; then
116
+ # Reject any regressions during the week before beta cutoff.
106
117
python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" regressed
107
118
fi
108
119
sed -i " 1 a\\
0 commit comments