diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2023-08-11 14:19:53 -0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2023-08-29 19:56:11 +0200 |
commit | 0119c894ab0dc468bcb03f28063239c0a4cf970f (patch) | |
tree | a44bc2c513b84836369f6aa85a77c14b1a68a027 /drivers/gpu/drm/ci/igt_runner.sh | |
parent | 3698a75f5a98d0a6599e2878ab25d30a82dd836a (diff) |
drm: Add initial ci/ subdirectory
Developers can easily execute several tests on different devices
by just pushing their branch to their fork in a repository hosted
on gitlab.freedesktop.org which has an infrastructure to run jobs
in several runners and farms with different devices.
There are also other automated tools that uprev dependencies,
monitor the infra, and so on that are already used by the Mesa
project, and we can reuse them too.
Also, store expectations about what the DRM drivers are supposed
to pass in the IGT test suite. By storing the test expectations
along with the code, we can make sure both stay in sync with each
other so we can know when a code change breaks those expectations.
Also, include a configuration file that points to the out-of-tree
CI scripts.
This will allow all contributors to drm to reuse the infrastructure
already in gitlab.freedesktop.org to test the driver on several
generations of the hardware.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
[sima: Remove top-level empty file test, spotted by sfr]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230811171953.176431-1-helen.koike@collabora.com
Diffstat (limited to 'drivers/gpu/drm/ci/igt_runner.sh')
-rwxr-xr-x | drivers/gpu/drm/ci/igt_runner.sh | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ci/igt_runner.sh b/drivers/gpu/drm/ci/igt_runner.sh new file mode 100755 index 000000000000..2bb759165063 --- /dev/null +++ b/drivers/gpu/drm/ci/igt_runner.sh @@ -0,0 +1,77 @@ +#!/bin/sh +# SPDX-License-Identifier: MIT + +set -ex + +export IGT_FORCE_DRIVER=${DRIVER_NAME} +export PATH=$PATH:/igt/bin/ +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib/aarch64-linux-gnu/:/igt/lib/x86_64-linux-gnu:/igt/lib:/igt/lib64 + +# Uncomment the below to debug problems with driver probing +: ' +ls -l /dev/dri/ +cat /sys/kernel/debug/devices_deferred +cat /sys/kernel/debug/device_component/* +' + +# Dump drm state to confirm that kernel was able to find a connected display: +# TODO this path might not exist for all drivers.. maybe run modetest instead? +set +e +cat /sys/kernel/debug/dri/*/state +set -e + +# Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib +if [ "$IGT_FORCE_DRIVER" = "amdgpu" ]; then + mv /install/modules/lib/modules/* /lib/modules/. + modprobe amdgpu +fi + +if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then + IGT_SKIPS="--skips /install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" +fi + +if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" ]; then + IGT_FLAKES="--flakes /install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" +fi + +if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" ]; then + IGT_FAILS="--baseline /install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" +fi + +if [ "`uname -m`" = "aarch64" ]; then + ARCH="arm64" +elif [ "`uname -m`" = "armv7l" ]; then + ARCH="arm" +else + ARCH="x86_64" +fi + +curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s ${FDO_HTTP_CACHE_URI:-}$PIPELINE_ARTIFACTS_BASE/$ARCH/igt.tar.gz | tar --zstd -v -x -C / + +set +e +igt-runner \ + run \ + --igt-folder /igt/libexec/igt-gpu-tools \ + --caselist /install/testlist.txt \ + --output /results \ + $IGT_SKIPS \ + $IGT_FLAKES \ + $IGT_FAILS \ + --fraction-start $CI_NODE_INDEX \ + --fraction $CI_NODE_TOTAL \ + --jobs 1 +ret=$? +set -e + +deqp-runner junit \ + --testsuite IGT \ + --results /results/failures.csv \ + --output /results/junit.xml \ + --limit 50 \ + --template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml" + +# Store the results also in the simpler format used by the runner in ChromeOS CI +#sed -r 's/(dmesg-warn|pass)/success/g' /results/results.txt > /results/results_simple.txt + +cd $oldpath +exit $ret |