diff options
author | Arthur She <arthur.she@linaro.org> | 2020-08-26 14:14:05 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2020-08-26 14:14:05 -0700 |
commit | ec6810080f7783e34d76dafd3031d4273a622b81 (patch) | |
tree | 0462df54a495b899a0a41b4b348c27c40e9fa2e9 /automated/linux/igt/igt-test-alpha.yaml | |
parent | 900172bf01582b10c0936a921826c41e36199a84 (diff) |
igt: Add igt-test-alpha.yaml for testing purpose
Signed-off-by: Arthur She <arthur.she@linaro.org>
Diffstat (limited to 'automated/linux/igt/igt-test-alpha.yaml')
-rw-r--r-- | automated/linux/igt/igt-test-alpha.yaml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/automated/linux/igt/igt-test-alpha.yaml b/automated/linux/igt/igt-test-alpha.yaml new file mode 100644 index 0000000..c0b7626 --- /dev/null +++ b/automated/linux/igt/igt-test-alpha.yaml @@ -0,0 +1,68 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: igt-test + description: "Run igt-gpu-tools with a given test list" + maintainer: + - arthur.she@linaro.org + os: + - debian + - ubuntu + - openembedded + scope: + - functional + devices: + - dragonboard-410c + - x15 + +params: + HDMI_DEV_NAME: "HDMI-A-1" + IGT_DIR: "/igt-gpu-tools" + # TEST_LIST: "CHAMELIUM" will run Chamelium test + TEST_LIST: "CHAMELIUM" + ARTIFACTORIAL_URL: "" + ARTIFACTORIAL_TOKEN: "" + CHAMELIUM_PING_RETRY: 2 + +run: + steps: + # Reboot Chamelium + - echo -e "\nReboot the chamelium\n" + - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} sh -c "/sbin/reboot" + - sleep 30 + - cd ./automated/linux/igt + - OPT="-d ${IGT_DIR} -t ${TEST_LIST}" + - if [ "${TEST_LIST}" = "CHAMELIUM" ]; then + # 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" + # Check Chamelium uboot console status + - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} /usr/bin/lock_u_boot_console || true + # Showing the uptime of Chamelium + - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} /usr/bin/uptime || true + - if [ -n "${CHAMELIUM_IP}" ]; then OPT="${OPT} -c ${CHAMELIUM_IP}"; fi + - if [ -n "${HDMI_DEV_NAME}" ]; then OPT="${OPT} -h ${HDMI_DEV_NAME}"; fi + - fi + - ./igt-test.sh ${OPT} + # Delete Chameliumd log + - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} /usr/bin/uptime + # - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} sh -c "echo '' > /var/log/chameleond" + # - ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP} sh -c "echo '' > /var/log/chameleond_init" + # Dump igt test result and upload artifact to Artifactorial + - ifconfig; pwd; ls -l + - echo "**********************************************"; + - echo "************ Dump IGT test result ************"; + - echo "**********************************************"; + - if [ -f "${IGT_DIR}/results/results.json.bz2" ]; then bunzip2 ${IGT_DIR}/results/results.json.bz2; fi + - ./print-test-result.py -f ${IGT_DIR}/results/results.json + - if [ -n "${ARTIFACTORIAL_TOKEN}" -a -n "${ARTIFACTORIAL_URL}" ]; then + - UPLOAD_TOOL="../../utils/upload-to-artifactorial.sh" + - if [ -d "/root/dump-frames/" -a -n "`ls /root/dump-frames/`" ]; then echo "Got error frames.." ; tar -C /root -zcf dump-frames.tar.gz dump-frames/; + - echo "*********************************************"; + - echo "************ Upload dump frames *************"; + - echo "*********************************************"; + - ${UPLOAD_TOOL} -a "dump-frames.tar.gz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"; fi; fi + # Upload Chamelium log + - echo -e "\nUpload Chamelium log\n" + - scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CHAMELIUM_IP}:/var/log/chameleond* . + - tar -zcf chamelium.log.tar.gz chameleond* + - ${UPLOAD_TOOL} -a "chamelium.log.tar.gz" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}" |