diff options
author | Arthur <arthur.she@linaro.org> | 2020-03-25 15:37:35 -0700 |
---|---|---|
committer | Arthur <arthur.she@linaro.org> | 2020-03-25 15:37:35 -0700 |
commit | e23173433f78414d43ca91137ccd05cecbcf2cf0 (patch) | |
tree | 85cd6568496dd445952771ee31889d286d8208ea /automated/linux/igt/igt-test.sh | |
parent | c119dea0ffec0657a59598bfd11960fca082ccd5 (diff) |
igt: Make it compatible with igt_runner and piglit
Signed-off-by: Arthur <arthur.she@linaro.org>
Diffstat (limited to 'automated/linux/igt/igt-test.sh')
-rwxr-xr-x | automated/linux/igt/igt-test.sh | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/automated/linux/igt/igt-test.sh b/automated/linux/igt/igt-test.sh index 634afae..c770e44 100755 --- a/automated/linux/igt/igt-test.sh +++ b/automated/linux/igt/igt-test.sh @@ -1,7 +1,5 @@ #!/bin/bash -set -x - RESULT_LOG="result.log" DUMP_FRAMES_DIR="/root/dump-frames" @@ -31,6 +29,15 @@ generate_chamelium_testlist() { ${TEST_SCRIPT} -l | grep chamelium | grep -v "dp\|vga\|suspend\|hibernate" | tee "${IGT_DIR}"/"${TEST_LIST}" } +download_piglit() { + # Download Piglit + git config --global http.postBuffer 157286400 + if [ ! -d "${IGT_DIR}/piglit" ]; then + echo "Download Piglit.." + time ${TEST_SCRIPT} -d + fi +} + usage() { echo "usage: $0 -d <igt-gpu-tools dir> -t <test-list> [-c <chamelium ip address>] [-h <HDMI device name>]" 1>&2 exit 1 @@ -50,38 +57,32 @@ if [ -z "${IGT_DIR}" ] || [ -z "${TEST_LIST}" ]; then usage fi -if [ "${TEST_LIST}" == "CHAMELIUM" ] && [ -z "${CHAMELIUM_IP}" -o -z "${HDMI_DEV_NAME}" ]; then +if [ "${TEST_LIST}" == "CHAMELIUM" ] && [ -z "${CHAMELIUM_IP}" ] || [ -z "${HDMI_DEV_NAME}" ]; then usage fi TEST_SCRIPT="${IGT_DIR}/scripts/run-tests.sh" -export GIT_SSL_NO_VERIFY=1 export IGT_TEST_ROOT="/usr/libexec/igt-gpu-tools" -# new run-tests.sh needs '-p' to run the tests with piglit -${TEST_SCRIPT} --help | grep -q '\-p' && TEST_SCRIPT="${TEST_SCRIPT} -p" - -# Download Piglit -git config --global http.postBuffer 157286400 -if [ ! -d "${IGT_DIR}/piglit" ]; then - echo "Download Piglit.." - time ${TEST_SCRIPT} -d +if [ ! -f "${IGT_DIR}/runner/igt_runner" ]; then + ${TEST_SCRIPT} --help | grep -q '\-p' && TEST_SCRIPT="${TEST_SCRIPT} -p" + download_piglit fi if [ "${TEST_LIST}" == "CHAMELIUM" ]; then - echo "Going to test igt Chamelium test" + echo "Going to run igt Chamelium test" if [ ! -f "$HOME/.igtrc" ]; then echo "Generate ~/.igtrc" generate_igtrc fi generate_chamelium_testlist else - echo "Going to test ${TEST_LIST}" - cp ${TEST_LIST} ${IGT_DIR} + echo "Going to run ${TEST_LIST}" + cp "${TEST_LIST}" "${IGT_DIR}" fi # Run tests echo "Run ${TEST_LIST}" -${TEST_SCRIPT} -T "${IGT_DIR}"/"${TEST_LIST}" -v -s | tee tmp.log +${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} |