aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2020-10-17 18:49:06 -0700
committerArthur She <arthur.she@linaro.org>2020-10-17 18:49:06 -0700
commit620d2e79c7b8fedcafd8216077f6828eb7e522f6 (patch)
tree9547d615b9c8e25efcd2b739e0788d2c11fffff7
parent4dc082339333bae074b4b189f2cb6abfd2aff167 (diff)
igt: update igt-test.yaml and print-test-result.pyHEADmaster
Signed-off-by: Arthur She <arthur.she@linaro.org>
-rw-r--r--automated/linux/igt/igt-test.yaml10
-rwxr-xr-xautomated/linux/igt/print-test-result.py4
2 files changed, 4 insertions, 10 deletions
diff --git a/automated/linux/igt/igt-test.yaml b/automated/linux/igt/igt-test.yaml
index 413fcee..acca290 100644
--- a/automated/linux/igt/igt-test.yaml
+++ b/automated/linux/igt/igt-test.yaml
@@ -32,8 +32,8 @@ run:
- 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
+ - echo -e "\nReboot the chamelium\n"
+ - ./control_chamelium.sh ${CHAMELIUM_REBOOT_ARG} || lava-test-raise "CAN-NOT-reboot-Chamelium"; 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"
@@ -45,17 +45,13 @@ run:
- 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
+ - PYTHONIOENCODING=utf-8 ./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/;
diff --git a/automated/linux/igt/print-test-result.py b/automated/linux/igt/print-test-result.py
index 626f219..a237de2 100755
--- a/automated/linux/igt/print-test-result.py
+++ b/automated/linux/igt/print-test-result.py
@@ -17,7 +17,6 @@ def print_result(results):
print('%-15s %s' % ('Returncode:', content['returncode']))
except KeyError:
pass
- print('type of out: %s' % type(content['out']))
print('%-15s %s' % ('Stdout:', content['out'].replace('\n', '\n ')))
print('%-15s %s' % ('Stderr:', content['err'].replace('\n', '\n ')))
print('%-15s %s' % ('dmesg:', content['dmesg'].replace('\n', '\n ')))
@@ -31,7 +30,7 @@ if __name__ == '__main__':
"--json-file",
nargs='?',
default=sys.stdin,
- type=argparse.FileType('r', encoding='utf-8'),
+ type=argparse.FileType('r', encoding='UTF-8'),
help="Test result file in json format")
args = parser.parse_args()
@@ -41,4 +40,3 @@ if __name__ == '__main__':
print('sys.stdout.encoding: %s' % (sys.stdout.encoding))
print_result(results)
print('sys.stdout.encoding: %s' % (sys.stdout.encoding))
-# type=argparse.FileType('r', encoding='UTF-8'),