From: Aleksander Mistewicz Date: Mon, 22 Aug 2016 09:22:56 +0000 (+0200) Subject: Unify odroid and minnow sleep values X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F84440%2F9;p=tools%2Ftestlab%2Fmajor.git Unify odroid and minnow sleep values Sleep values are now stored in: tct/common.sh Test results are now comparable. Change-Id: I32b08ae0b959b01d417665e8b0c487d09917d4f4 Signed-off-by: Aleksander Mistewicz --- diff --git a/tct/common.sh b/tct/common.sh index b9eede5..f2800fb 100755 --- a/tct/common.sh +++ b/tct/common.sh @@ -26,3 +26,9 @@ die() { printf >&2 -- '%s\n' "$1" exit "${2:-1}" } + +# INIT_SLEEP <= RESTART_SLEEP <= MAX_SLEEP +INC_SLEEP=10 +INIT_SLEEP=60 +RESTART_SLEEP=80 +MAX_SLEEP=120 diff --git a/tct/minnow_prepare_flash_conf.sh b/tct/minnow_prepare_flash_conf.sh index e4b14d1..8482f2f 100755 --- a/tct/minnow_prepare_flash_conf.sh +++ b/tct/minnow_prepare_flash_conf.sh @@ -67,22 +67,24 @@ restart_device "${SDMUX}" echo "### conf ###" CONNECT_CNT=0 -SLEEP=30 +SLEEP=${INIT_SLEEP} + +sleep "${SLEEP}" while ! ping -c 1 "${IP}" -W 1 | grep -q icmp_seq do printf "," - if [ ${SLEEP} -ge 150 ] + if [ ${SLEEP} -ge ${MAX_SLEEP} ] then die "Timeout: host not found in the network!" fi - if [ ${SLEEP} -ge 90 ] + if [ ${SLEEP} -ge ${RESTART_SLEEP} ] then echo "Restarting MINNOW" >&2 restart_device "${SDMUX}" fi sleep "${SLEEP}" - SLEEP=$((SLEEP+20)) + SLEEP=$((SLEEP+INC_SLEEP)) CONNECT_CNT=$((CONNECT_CNT+1)) done @@ -100,13 +102,8 @@ do SLEEP=$((SLEEP+10)) CONNECT_CNT=$((CONNECT_CNT+1)) done - printf "\n" -sleep 4 - -SLEEP=10 - copy_ssh "${IP}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" run_smoke_ssh "${IP}" diff --git a/tct/odroid_prepare_flash_conf.sh b/tct/odroid_prepare_flash_conf.sh index 5a2d4b2..ed74a29 100755 --- a/tct/odroid_prepare_flash_conf.sh +++ b/tct/odroid_prepare_flash_conf.sh @@ -73,22 +73,24 @@ echo "### conf ###" CONNECT_CNT=0 sdb start-server -SLEEP=10 +SLEEP=${INIT_SLEEP} + +sleep "${SLEEP}" while [ -z "$(sdb devices | awk -v SDMUX="${SDMUX}" '$1 == SDMUX {print $1}')" ] do printf "." - if [ ${SLEEP} -ge 120 ] + if [ ${SLEEP} -ge ${MAX_SLEEP} ] then die "Timeout: sdb device not found!" >&2 fi - if [ ${SLEEP} -ge 60 ] + if [ ${SLEEP} -ge ${RESTART_SLEEP} ] then echo "Restarting ODROID" >&2 restart_device "${SDMUX}" fi sleep "${SLEEP}" - SLEEP=$((SLEEP+10)) + SLEEP=$((SLEEP+INC_SLEEP)) CONNECT_CNT=$((CONNECT_CNT+1)) done