From d7f1cc47cc07f29bc9d13664a173f1b2b323c458 Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Thu, 4 Nov 2021 13:40:51 +0100 Subject: [PATCH] Alternate solution to cancel travis timeout Signed-off-by: TheJackiMonster --- .travis.yml | 2 +- package/prepare_osx.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index dac33a6..995f028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ os: osx_image: xcode11 sudo: required install: -- if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_wait package/prepare_osx.sh; fi +- if [ "$TRAVIS_OS_NAME" = "osx" ]; then package/prepare_osx.sh; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then package/prepare_linux.sh; fi script: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 -B -m pytest -vs; fi diff --git a/package/prepare_osx.sh b/package/prepare_osx.sh index bc58ff9..7ee4df1 100755 --- a/package/prepare_osx.sh +++ b/package/prepare_osx.sh @@ -1,6 +1,14 @@ #!/bin/bash set -ev # display each line executed along with output -brew update +brew update & +while true; do + ps -p$! 2>& 1>/dev/null + if [ $? = 0 ]; then + echo "still updating..."; sleep 5 + else + break + fi +done # Upgrade to python 3.x brew upgrade python