Skip to content

Commit b817403

Browse files
committed
Document the checktools script
1 parent 050cb1c commit b817403

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ci/docker/x86_64-gnu-tools/checktools.sh

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ SIX_WEEK_CYCLE="$(( ($(date +%s) / 604800 - 3) % 6 ))"
2323

2424
touch "$TOOLSTATE_FILE"
2525

26+
# Try to test all the tools and store the build/test success in the TOOLSTATE_FILE
27+
2628
set +e
2729
python2.7 "$X_PY" test --no-fail-fast \
2830
src/doc/book \
@@ -38,6 +40,7 @@ set -e
3840
cat "$TOOLSTATE_FILE"
3941
echo
4042

43+
# This function checks that if a tool's submodule changed, the tool's state must improve
4144
verify_status() {
4245
echo "Verifying status of $1..."
4346
if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then
@@ -57,6 +60,7 @@ verify_status() {
5760
fi
5861
}
5962

63+
# deduplicates the submodule check and the assertion that on beta some tools MUST be passing
6064
check_dispatch() {
6165
if [ "$1" = submodule_changed ]; then
6266
# ignore $2 (branch id)
@@ -69,6 +73,7 @@ check_dispatch() {
6973
fi
7074
}
7175

76+
# list all tools here
7277
status_check() {
7378
check_dispatch $1 beta book src/doc/book
7479
check_dispatch $1 beta nomicon src/doc/nomicon
@@ -103,4 +108,6 @@ $COMMIT\t$(cat "$TOOLSTATE_FILE")
103108
exit 0
104109
fi
105110

111+
# abort compilation if an important tool doesn't build
112+
# (this code is reachable if not on the nightly channel)
106113
status_check "beta_required"

0 commit comments

Comments
 (0)