diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-27 21:58:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-27 22:32:57 +0300 |
commit | 25847a08231312f4b0017e88f7eecb49c566c71e (patch) | |
tree | 84a53f0779efc9f8229c7f78830d6a43e44e8c2b /tools/ci/scripts/runtest.sh | |
parent | d5575529b244757b4d5d75b196772131d5575e43 (diff) | |
download | manaplus-25847a08231312f4b0017e88f7eecb49c566c71e.tar.gz manaplus-25847a08231312f4b0017e88f7eecb49c566c71e.tar.bz2 manaplus-25847a08231312f4b0017e88f7eecb49c566c71e.tar.xz manaplus-25847a08231312f4b0017e88f7eecb49c566c71e.zip |
Check for servers list download complete in run tests.
Diffstat (limited to 'tools/ci/scripts/runtest.sh')
-rwxr-xr-x | tools/ci/scripts/runtest.sh | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh index 371249c2f..38b0456eb 100755 --- a/tools/ci/scripts/runtest.sh +++ b/tools/ci/scripts/runtest.sh @@ -17,12 +17,36 @@ function check_is_run { fi } +function wait_for_servers_list { + n=0 + while true; do + echo "wait for servers list ${n}" + check_is_run + # check here + grep "Skipping servers list update" "${HOME}/.local/share/mana/manaplus.log" && return + grep "Servers list updated" "${HOME}/.local/share/mana/manaplus.log" && return + grep "Error: servers list updating error" "${HOME}/.local/share/mana/manaplus.log" + if [ "$?" == 0 ]; then + echo "Servers list downloading error" + exit 1 + fi + + if [[ $n -ge 150 ]]; then + break + fi + sleep 5s + n=$((n+1)) + done + echo "Waiting time for servers list update is up" + exit 1 +} + function run { ./src/manaplus --default-cursor --enable-ipc --renderer=0 >logs/run.log 2>&1 & export PID=$! - sleep 30s + sleep 20s echo "pause after run" - sleep 30s + wait_for_servers_list } function kill_app { |