@@ -42,7 +42,7 @@ check_tool_failed() {
42
42
}
43
43
44
44
# This function checks that if a tool's submodule changed, the tool's state must improve
45
- verify_status () {
45
+ verify_submodule_changed () {
46
46
echo " Verifying status of $1 ..."
47
47
if echo " $CHANGED_FILES " | grep -q " ^M[[:blank:]]$2 $" ; then
48
48
echo " This PR updated '$2 ', verifying if status is 'test-pass'..."
@@ -67,7 +67,7 @@ verify_status() {
67
67
check_dispatch () {
68
68
if [ " $1 " = submodule_changed ]; then
69
69
# ignore $2 (branch id)
70
- verify_status $3 $4
70
+ verify_submodule_changed $3 $4
71
71
elif [ " $2 " = beta ]; then
72
72
echo " Requiring test passing for $3 ..."
73
73
if check_tool_failed " $3 " ; then
@@ -76,7 +76,9 @@ check_dispatch() {
76
76
fi
77
77
}
78
78
79
- # 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.
80
82
status_check () {
81
83
check_dispatch $1 beta book src/doc/book
82
84
check_dispatch $1 beta nomicon src/doc/nomicon
@@ -86,7 +88,8 @@ status_check() {
86
88
check_dispatch $1 beta rls src/tools/rls
87
89
check_dispatch $1 beta rustfmt src/tools/rustfmt
88
90
check_dispatch $1 beta clippy-driver src/tools/clippy
89
- # these tools are not required for beta to successfully branch
91
+ # These tools are not required on the beta/stable branches.
92
+ # They will still cause failure during the beta cutoff week, see `src/tools/publish_toolstate.py` for that.
90
93
check_dispatch $1 nightly miri src/tools/miri
91
94
check_dispatch $1 nightly embedded-book src/doc/embedded-book
92
95
}
@@ -97,6 +100,7 @@ status_check() {
97
100
status_check " submodule_changed"
98
101
99
102
CHECK_NOT=" $( readlink -f " $( dirname $0 ) /checkregression.py" ) "
103
+ # This callback is called by `commit_toolstate_change`, see `repo.sh`.
100
104
change_toolstate () {
101
105
# only update the history
102
106
if python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" changed; then
0 commit comments