@@ -41,7 +41,7 @@ check_tool_failed() {
41
41
}
42
42
43
43
# This function checks that if a tool's submodule changed, the tool's state must improve
44
- verify_status () {
44
+ verify_submodule_changed () {
45
45
echo " Verifying status of $1 ..."
46
46
if echo " $CHANGED_FILES " | grep -q " ^M[[:blank:]]$2 $" ; then
47
47
echo " This PR updated '$2 ', verifying if status is 'test-pass'..."
@@ -66,7 +66,7 @@ verify_status() {
66
66
check_dispatch () {
67
67
if [ " $1 " = submodule_changed ]; then
68
68
# ignore $2 (branch id)
69
- verify_status $3 $4
69
+ verify_submodule_changed $3 $4
70
70
elif [ " $2 " = beta ]; then
71
71
echo " Requiring test passing for $3 ..."
72
72
if check_tool_failed " $3 " ; then
@@ -75,7 +75,9 @@ check_dispatch() {
75
75
fi
76
76
}
77
77
78
- # list all tools here
78
+ # List all tools here.
79
+ # This function gets called with "submodule_changed" for each PR that changed a submodule,
80
+ # and with "beta_required" for each PR that lands on beta/stable.
79
81
status_check () {
80
82
check_dispatch $1 beta book src/doc/book
81
83
check_dispatch $1 beta nomicon src/doc/nomicon
@@ -85,7 +87,8 @@ status_check() {
85
87
check_dispatch $1 beta rls src/tools/rls
86
88
check_dispatch $1 beta rustfmt src/tools/rustfmt
87
89
check_dispatch $1 beta clippy-driver src/tools/clippy
88
- # these tools are not required for beta to successfully branch
90
+ # These tools are not required on the beta/stable branches.
91
+ # They will still cause failure during the beta cutoff week, see `src/tools/publish_toolstate.py` for that.
89
92
check_dispatch $1 nightly miri src/tools/miri
90
93
check_dispatch $1 nightly embedded-book src/doc/embedded-book
91
94
check_dispatch $1 nightly rustc-guide src/doc/rustc-guide
@@ -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