aboutsummaryrefslogtreecommitdiff
path: root/automated/linux/igt
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2019-04-04 11:15:04 +0700
committernareshkamboju <naresh.kamboju@gmail.com>2019-04-11 17:26:47 +0530
commita49e304ed4f03ec94ece78c5511bc33878643c2a (patch)
tree3b4d8f73809aafe080887e0ba2de6835b8f8c5a8 /automated/linux/igt
parent65a69113d50a9acb500f5935b0644a91157df912 (diff)
automated/linux: add new test igt
Diffstat (limited to 'automated/linux/igt')
-rwxr-xr-xautomated/linux/igt/igt-chamelium-test.sh70
-rw-r--r--automated/linux/igt/igt-chamelium-test.yaml33
2 files changed, 103 insertions, 0 deletions
diff --git a/automated/linux/igt/igt-chamelium-test.sh b/automated/linux/igt/igt-chamelium-test.sh
new file mode 100755
index 00000000..fb1a8529
--- /dev/null
+++ b/automated/linux/igt/igt-chamelium-test.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+RESULT_LOG="result.log"
+
+generate_igtrc() {
+cd "$HOME" || exit 1
+
+mkdir -p /root
+
+cat > ".igtrc" <<-EOF
+[Common]
+FrameDumpPath=/root/
+[DUT]
+SuspendResumeDelay=15
+[Chamelium]
+URL=http://${CHAMELIUM_IP}:9992
+[Chamelium:${HDMI_DEV_NAME}]
+ChameliumPortID=3
+EOF
+
+cd - > /dev/null 2>&1 || exit 1
+}
+
+generate_chamelium_testlist() {
+ echo "Generate test list"
+ TEST_LIST=igt-chamelium-test.testlist
+ # Skip Display Port/VGA and Suspend/Hibrnate related tests
+ ${TEST_SCRIPT} -l | grep chamelium | grep -v "dp\|vga\|suspend\|hibernate" | tee "${IGT_DIR}"/"${TEST_LIST}"
+}
+
+usage() {
+ echo "usage: $0 -c <chamelium ip address> -h <HDMI device name> -d <igt-gpu-tools dir> [-t <test-list>]" 1>&2
+ exit 1
+}
+
+while getopts ":c:h:d:t:" opt; do
+ case "${opt}" in
+ c) CHAMELIUM_IP="${OPTARG}" ;;
+ h) HDMI_DEV_NAME="${OPTARG}" ;;
+ d) IGT_DIR="${OPTARG}" ;;
+ t) TEST_LIST="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+if [ -z "${CHAMELIUM_IP}" ] || [ -z "${HDMI_DEV_NAME}" ] || [ -z "${IGT_DIR}" ]; then
+ usage
+fi
+
+TEST_SCRIPT="${IGT_DIR}/scripts/run-tests.sh"
+
+# generate ~/.igtrc
+if [ ! -f "$HOME/.igtrc" ]; then
+ echo "Generate ~/.igtrc"
+ generate_igtrc
+fi
+# Download Piglit
+if [ ! -d "${IGT_DIR}/piglit" ]; then
+ echo "Download Piglit.."
+ ${TEST_SCRIPT} -d
+fi
+# If test list is not assigned, generate it
+if [ -z "${TEST_LIST}" ]; then
+ generate_chamelium_testlist
+fi
+
+# Run tests
+echo "Run ${TEST_LIST}"
+${TEST_SCRIPT} -T "${IGT_DIR}"/"${TEST_LIST}" -v | tee tmp.log
+grep -e '^pass' -e '^skip' -e '^fail' tmp.log|awk -F':\ ' '{print $2" "$1}' > ${RESULT_LOG}
diff --git a/automated/linux/igt/igt-chamelium-test.yaml b/automated/linux/igt/igt-chamelium-test.yaml
new file mode 100644
index 00000000..b372f3d9
--- /dev/null
+++ b/automated/linux/igt/igt-chamelium-test.yaml
@@ -0,0 +1,33 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: igt-chamelium-test
+ description: "Run igt-gpu-tools with Chamelium for pixel formats testing"
+ maintainer:
+ - arthur.she@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - dragonboard-410c
+ - x15
+
+params:
+ CHAMELIUM_IP: "192.168.29.200"
+ HDMI_DEV_NAME: "HDMI-A-1"
+ IGT_DIR: "/igt-gpu-tools"
+ # If TEST_LIST is not assigned, it will generate it with all
+ # Chanelium HDMI related tests
+ #TEST_LIST: "tests/vc4_ci/vc4-chamelium.testlist"
+ TEST_LIST: ""
+ TL: ""
+
+run:
+ steps:
+ - cd ./automated/linux/igt
+ - git config --global http.sslverify false
+ - if [ -n "${TEST_LIST}" ]; then TL="-t ${TEST_LIST}"; fi
+ - ./igt-chamelium-test.sh -c ${CHAMELIUM_IP} -h ${HDMI_DEV_NAME} -d ${IGT_DIR} ${TL}
+ - ../../utils/send-to-lava.sh result.log