Skip to content
Permalink
Browse files

[travis] also timeout tests (#6747)

  • Loading branch information
3nids committed Apr 4, 2018
1 parent 634274e commit 2cae2f40a7da862be3ae1cb3bf1f5c50438a7037
Showing with 10 additions and 2 deletions.
  1. +10 −2 .ci/travis/linux/docker-build-test.sh
@@ -67,7 +67,7 @@ echo "travis_fold:end:cmake"
# uploading and subtract the bootstrapping time from that.
# Hopefully clocks are in sync :)
TRAVIS_TIME=90
UPLOAD_TIME=8
UPLOAD_TIME=5
CURRENT_TIME=`date +%s`
TIMEOUT=$(expr \( ${TRAVIS_TIME} - ${UPLOAD_TIME} \) \* 60 - ${CURRENT_TIME} + ${TRAVIS_TIMESTAMP})
TIMEOUT=$(( ${TIMEOUT} < 300 ? 300 : ${TIMEOUT} ))
@@ -105,7 +105,15 @@ popd > /dev/null # /root/QGIS
###########
# Run tests
###########
python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V -E "$(cat /root/QGIS/.ci/travis/linux/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S /root/QGIS/.ci/travis/travis.ctest --output-on-failure
CURRENT_TIME=`date +%s`
TIMEOUT=$(expr \( ${TRAVIS_TIME} - ${UPLOAD_TIME} \) \* 60 - ${CURRENT_TIME} + ${TRAVIS_TIMESTAMP})
echo "Timeout: ${TIMEOUT}s (started at ${TRAVIS_TIMESTAMP}, current: ${CURRENT_TIME})"
timeout ${TIMEOUT}s python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V -E "$(cat /root/QGIS/.ci/travis/linux/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S /root/QGIS/.ci/travis/travis.ctest --output-on-failure
rv=$?
if [ $rv -eq 124 ] ; then
printf '\n\n${bold}Build and test timeout. Please restart the build for meaningful results.${endbold}\n'
exit #$rv
fi

########################
# Show ccache statistics

0 comments on commit 2cae2f4

Please sign in to comment.
You can’t perform that action at this time.