hack around timeouts (#416)
This commit is contained in:
parent
dcf77e10b3
commit
3046ae6638
|
|
@ -8,9 +8,9 @@ before_install:
|
||||||
- MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md
|
- MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md
|
||||||
install:
|
install:
|
||||||
- source ~/.cargo/env || true
|
- source ~/.cargo/env || true
|
||||||
- bash ci/install.sh
|
- bash -x ci/install.sh
|
||||||
script:
|
script:
|
||||||
- mdbook build
|
- bash -x ci/build-ignore-timeouts.sh
|
||||||
- mdbook test
|
- mdbook test
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue