aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2020-09-10 19:38:11 -0700
committerArthur She <arthur.she@linaro.org>2020-09-10 22:36:49 -0700
commit4228914c3b0fb75530ffaddbd5ed6ca297dd682e (patch)
tree6b63264c77c3c0aff594aa52107aa325841dbaa0
parent54164a27979de698fd36f1b4da56b2893be2c4a4 (diff)
igt: Check target network status before go further
Fix the test result will be misleading when the network is unavailable. 1. Stop testing if the network is not available 2. Power cycle Chamelium before running igt Chamelium test Signed-off-by: Arthur She <arthur.she@linaro.org>
-rw-r--r--automated/linux/igt/igt-test.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/automated/linux/igt/igt-test.yaml b/automated/linux/igt/igt-test.yaml
index 142e7344..e172980c 100644
--- a/automated/linux/igt/igt-test.yaml
+++ b/automated/linux/igt/igt-test.yaml
@@ -27,7 +27,13 @@ run:
steps:
- cd ./automated/linux/igt
- OPT="-d ${IGT_DIR} -t ${TEST_LIST}"
+ # Check if the network is available
+ - ifconfig
+ - ping -c 2 www.google.com || lava-test-raise "Target-network-failed"
- if [ "${TEST_LIST}" = "CHAMELIUM" ]; then
+ # Reboot Chamelium
+ - echo -e "\nReboot the chamelium\n"
+ - ./control_chamelium.sh ${CHAMELIUM_REBOOT_ARG}; sleep 30
# Check if Chamelium is available. ${CHAMELIUM_IP} is from LAVA device dictionary
- while [ ${CHAMELIUM_PING_RETRY} -gt 0 ]; do PC=`ping -c 2 ${CHAMELIUM_IP}|grep '100% packet loss'`||true; if [ -n "${PC}" ]; then ./control_chamelium.sh ${CHAMELIUM_REBOOT_ARG}; sleep 30; (( CHAMELIUM_PING_RETRY-- )); else break; fi; done
- test -n "${CHAMELIUM_IP}" && test ${CHAMELIUM_PING_RETRY} -gt 0 && lava-test-case "Ping-Chamelium" --result pass || lava-test-raise "Ping-Chamelium"