igt_runner.sh 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. mkdir -p /lib/modules
  18. case "$DRIVER_NAME" in
  19. amdgpu|vkms)
  20. # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
  21. mv /install/modules/lib/modules/* /lib/modules/. || true
  22. modprobe --first-time $DRIVER_NAME
  23. ;;
  24. esac
  25. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
  26. IGT_SKIPS="--skips /install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt"
  27. fi
  28. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" ]; then
  29. IGT_FLAKES="--flakes /install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt"
  30. fi
  31. if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" ]; then
  32. IGT_FAILS="--baseline /install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt"
  33. fi
  34. if [ "`uname -m`" = "aarch64" ]; then
  35. ARCH="arm64"
  36. elif [ "`uname -m`" = "armv7l" ]; then
  37. ARCH="arm"
  38. else
  39. ARCH="x86_64"
  40. fi
  41. curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s $PIPELINE_ARTIFACTS_BASE/$ARCH/igt.tar.gz | tar --zstd -v -x -C /
  42. TESTLIST="/igt/libexec/igt-gpu-tools/ci-testlist.txt"
  43. # If the job is parallel at the gitab job level, take the corresponding fraction
  44. # of the caselist.
  45. if [ -n "$CI_NODE_INDEX" ]; then
  46. sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
  47. fi
  48. # core_getversion checks if the driver is loaded and probed correctly
  49. # so run it in all shards
  50. if ! grep -q "core_getversion" $TESTLIST; then
  51. # Add the line to the file
  52. echo "core_getversion" >> $TESTLIST
  53. fi
  54. set +e
  55. igt-runner \
  56. run \
  57. --igt-folder /igt/libexec/igt-gpu-tools \
  58. --caselist $TESTLIST \
  59. --output $RESULTS_DIR \
  60. -vvvv \
  61. $IGT_SKIPS \
  62. $IGT_FLAKES \
  63. $IGT_FAILS \
  64. --jobs 1
  65. ret=$?
  66. set -e
  67. deqp-runner junit \
  68. --testsuite IGT \
  69. --results $RESULTS_DIR/failures.csv \
  70. --output $RESULTS_DIR/junit.xml \
  71. --limit 50 \
  72. --template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
  73. # Check if /proc/lockdep_stats exists
  74. if [ -f /proc/lockdep_stats ]; then
  75. # If debug_locks is 0, it indicates lockdep is detected and it turns itself off.
  76. debug_locks=$(grep 'debug_locks:' /proc/lockdep_stats | awk '{print $2}')
  77. if [ "$debug_locks" -eq 0 ] && [ "$ret" -eq 0 ]; then
  78. echo "Warning: LOCKDEP issue detected. Please check dmesg logs for more information."
  79. cat /proc/lockdep_stats
  80. ret=101
  81. fi
  82. fi
  83. cd $oldpath
  84. exit $ret