Unify odroid and minnow sleep values 40/84440/9
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Mon, 22 Aug 2016 09:22:56 +0000 (11:22 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 6 Dec 2016 15:37:14 +0000 (16:37 +0100)
Sleep values are now stored in: tct/common.sh
Test results are now comparable.

Change-Id: I32b08ae0b959b01d417665e8b0c487d09917d4f4
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tct/common.sh
tct/minnow_prepare_flash_conf.sh
tct/odroid_prepare_flash_conf.sh

index b9eede5..f2800fb 100755 (executable)
@@ -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
index e4b14d1..8482f2f 100755 (executable)
@@ -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}"
 
index 5a2d4b2..ed74a29 100755 (executable)
@@ -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