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>
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
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
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}"
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