igt_runner.sh 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/bin/sh
  2. # SPDX-License-Identifier: MIT
  3. set -ex
  4. export IGT_FORCE_DRIVER=${DRIVER_NAME}
  5. export PATH=$PATH:/igt/bin/
  6. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib/aarch64-linux-gnu/:/igt/lib/x86_64-linux-gnu:/igt/lib:/igt/lib64
  7. # Uncomment the below to debug problems with driver probing
  8. : '
  9. ls -l /dev/dri/
  10. cat /sys/kernel/debug/devices_deferred
  11. cat /sys/kernel/debug/device_component/*
  12. '
  13. # Dump drm state to confirm that kernel was able to find a connected display:
  14. set +e
  15. cat /sys/kernel/debug/dri/*/state
  16. set -e
  17. case "$DRIVER_NAME" in
  18. amdgpu|vkms)
  19. # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
  20. mv /install/modules/lib/modules/* /lib/modules/. || true
  21. modprobe --first-time $DRIVER_NAME
  22. ;;
  23. esac
  24. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
  25. IGT_SKIPS="--skips /install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt"
  26. fi
  27. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" ]; then
  28. IGT_FLAKES="--flakes /install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt"
  29. fi
  30. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" ]; then
  31. IGT_FAILS="--baseline /install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt"
  32. fi
  33. if [ "`uname -m`" = "aarch64" ]; then
  34. ARCH="arm64"
  35. elif [ "`uname -m`" = "armv7l" ]; then
  36. ARCH="arm"
  37. else
  38. ARCH="x86_64"
  39. fi
  40. 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 /
  41. TESTLIST="/igt/libexec/igt-gpu-tools/ci-testlist.txt"
  42. # If the job is parallel at the gitab job level, take the corresponding fraction
  43. # of the caselist.
  44. if [ -n "$CI_NODE_INDEX" ]; then
  45. sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
  46. fi
  47. # core_getversion checks if the driver is loaded and probed correctly
  48. # so run it in all shards
  49. if ! grep -q "core_getversion" $TESTLIST; then
  50. # Add the line to the file
  51. echo "core_getversion" >> $TESTLIST
  52. fi
  53. set +e
  54. igt-runner \
  55. run \
  56. --igt-folder /igt/libexec/igt-gpu-tools \
  57. --caselist $TESTLIST \
  58. --output /results \
  59. -vvvv \
  60. $IGT_SKIPS \
  61. $IGT_FLAKES \
  62. $IGT_FAILS \
  63. --jobs 1
  64. ret=$?
  65. set -e
  66. deqp-runner junit \
  67. --testsuite IGT \
  68. --results /results/failures.csv \
  69. --output /results/junit.xml \
  70. --limit 50 \
  71. --template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml"
  72. # Store the results also in the simpler format used by the runner in ChromeOS CI
  73. #sed -r 's/(dmesg-warn|pass)/success/g' /results/results.txt > /results/results_simple.txt
  74. cd $oldpath
  75. exit $ret