@@ -42,7 +42,7 @@ check_tool_failed() {
4242}
4343
4444# This function checks that if a tool's submodule changed, the tool's state must improve
45- verify_status () {
45+ verify_submodule_changed () {
4646 echo " Verifying status of $1 ..."
4747 if echo " $CHANGED_FILES " | grep -q " ^M[[:blank:]]$2 $" ; then
4848 echo " This PR updated '$2 ', verifying if status is 'test-pass'..."
@@ -67,7 +67,7 @@ verify_status() {
6767check_dispatch () {
6868 if [ " $1 " = submodule_changed ]; then
6969 # ignore $2 (branch id)
70- verify_status $3 $4
70+ verify_submodule_changed $3 $4
7171 elif [ " $2 " = beta ]; then
7272 echo " Requiring test passing for $3 ..."
7373 if check_tool_failed " $3 " ; then
@@ -76,7 +76,9 @@ check_dispatch() {
7676 fi
7777}
7878
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.
8082status_check () {
8183 check_dispatch $1 beta book src/doc/book
8284 check_dispatch $1 beta nomicon src/doc/nomicon
@@ -86,7 +88,8 @@ status_check() {
8688 check_dispatch $1 beta rls src/tools/rls
8789 check_dispatch $1 beta rustfmt src/tools/rustfmt
8890 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.
9093 check_dispatch $1 nightly miri src/tools/miri
9194 check_dispatch $1 nightly embedded-book src/doc/embedded-book
9295}
@@ -97,6 +100,7 @@ status_check() {
97100status_check " submodule_changed"
98101
99102CHECK_NOT=" $( readlink -f " $( dirname $0 ) /checkregression.py" ) "
103+ # This callback is called by `commit_toolstate_change`, see `repo.sh`.
100104change_toolstate () {
101105 # only update the history
102106 if python2.7 " $CHECK_NOT " " $OS " " $TOOLSTATE_FILE " " _data/latest.json" changed; then
0 commit comments