diff options
| author | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-08-05 15:57:25 -0500 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2019-08-05 17:57:25 -0300 |
| commit | de6cb97e4b673ef1ff975eb33d73097074f14925 (patch) | |
| tree | 5e5556a30833847b876e805004c467789b25a105 /src/doc/rustc-dev-guide/ci | |
| parent | 8fdbbda3db5fe8d8762197892c95a13691eed309 (diff) | |
| download | rust-de6cb97e4b673ef1ff975eb33d73097074f14925.tar.gz rust-de6cb97e4b673ef1ff975eb33d73097074f14925.zip | |
hack around timeouts (#416)
Diffstat (limited to 'src/doc/rustc-dev-guide/ci')
| -rw-r--r-- | src/doc/rustc-dev-guide/ci/build-ignore-timeouts.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/ci/build-ignore-timeouts.sh b/src/doc/rustc-dev-guide/ci/build-ignore-timeouts.sh new file mode 100644 index 00000000000..b21ce24e83f --- /dev/null +++ b/src/doc/rustc-dev-guide/ci/build-ignore-timeouts.sh @@ -0,0 +1,23 @@ + +output=$(mktemp) + +RUST_LOG=mdbook_linkcheck=debug mdbook build 2>&1 | tee $output + +result=${PIPESTATUS[0]} + +# if passed, great! +if [ "$result" -eq "0" ] ; then + exit 0 ; +fi + +errors=$(cat $output | sed -n 's/There \(was\|were\) \([0-9]\+\).*$/\2/p') +timeouts=$(cat $output | grep "error while fetching" | wc -l) + +# if all errors are timeouts, ignore them... +if [ "$errors" -eq "$timeouts" ] ; then + echo "Ignoring $timeouts timeouts"; + exit 0; +else + echo "Non-timeout errors found"; + exit 1; +fi |
