diff options
| author | bors <bors@rust-lang.org> | 2018-05-13 03:44:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-13 03:44:00 +0000 |
| commit | 6fc409ed0938cd2f501642abcaa675977fa5035a (patch) | |
| tree | f1f67de03d1ca6a3ffc9b4ed2b944b098ce9dd0c | |
| parent | 844bc65333184f90670e950233513e5c7bf0572e (diff) | |
| parent | b8174030841d1b3a26add05ba7de6d252c135d8c (diff) | |
| download | rust-6fc409ed0938cd2f501642abcaa675977fa5035a.tar.gz rust-6fc409ed0938cd2f501642abcaa675977fa5035a.zip | |
Auto merge of #50573 - oli-obk:tool_sanity, r=kennytm
Don't require clippy/miri for beta r? @kennytm cc @alexcrichton I'm trying this out locally atm to see if it works as I think it should. Not sure how to test it for real except wait for the next beta. fixes #50557
| -rwxr-xr-x | src/ci/docker/x86_64-gnu-tools/checktools.sh | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/x86_64-gnu-tools/checktools.sh index 3fed0175371..d71d5daf811 100755 --- a/src/ci/docker/x86_64-gnu-tools/checktools.sh +++ b/src/ci/docker/x86_64-gnu-tools/checktools.sh @@ -23,6 +23,8 @@ SIX_WEEK_CYCLE="$(( ($(date +%s) / 604800 - 3) % 6 ))" touch "$TOOLSTATE_FILE" +# Try to test all the tools and store the build/test success in the TOOLSTATE_FILE + set +e python2.7 "$X_PY" test --no-fail-fast \ src/doc/book \ @@ -38,6 +40,7 @@ set -e cat "$TOOLSTATE_FILE" echo +# This function checks that if a tool's submodule changed, the tool's state must improve verify_status() { echo "Verifying status of $1..." if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then @@ -57,17 +60,36 @@ verify_status() { fi } +# deduplicates the submodule check and the assertion that on beta some tools MUST be passing +check_dispatch() { + if [ "$1" = submodule_changed ]; then + # ignore $2 (branch id) + verify_status $3 $4 + elif [ "$2" = beta ]; then + echo "Requiring test passing for $3..." + if grep -q '"'"$3"'":"\(test\|build\)-fail"' "$TOOLSTATE_FILE"; then + exit 4 + fi + fi +} + +# list all tools here +status_check() { + check_dispatch $1 beta book src/doc/book + check_dispatch $1 beta nomicon src/doc/nomicon + check_dispatch $1 beta reference src/doc/reference + check_dispatch $1 beta rust-by-example src/doc/rust-by-example + check_dispatch $1 beta rls src/tool/rls + check_dispatch $1 beta rustfmt src/tool/rustfmt + # these tools are not required for beta to successfully branch + check_dispatch $1 nightly clippy-driver src/tool/clippy + check_dispatch $1 nightly miri src/tool/miri +} + # If this PR is intended to update one of these tools, do not let the build pass # when they do not test-pass. -verify_status book src/doc/book -verify_status nomicon src/doc/nomicon -verify_status reference src/doc/reference -verify_status rust-by-example src/doc/rust-by-example -verify_status rls src/tool/rls -verify_status rustfmt src/tool/rustfmt -verify_status clippy-driver src/tool/clippy -verify_status miri src/tool/miri +status_check "submodule_changed" if [ "$RUST_RELEASE_CHANNEL" = nightly -a -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then . "$(dirname $0)/repo.sh" @@ -86,6 +108,6 @@ $COMMIT\t$(cat "$TOOLSTATE_FILE") exit 0 fi -if grep -q fail "$TOOLSTATE_FILE"; then - exit 4 -fi +# abort compilation if an important tool doesn't build +# (this code is reachable if not on the nightly channel) +status_check "beta_required" |
