File Index
Files and directories
Sign in
FILE

igt_runner.sh

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/ci/igt_runner.sh BASH
  1#!/bin/sh
  2# SPDX-License-Identifier: MIT
  3
  4set -ex
  5
  6export IGT_FORCE_DRIVER=${DRIVER_NAME}
  7export PATH=$PATH:/igt/bin/
  8export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib/aarch64-linux-gnu/:/igt/lib/x86_64-linux-gnu:/igt/lib:/igt/lib64
  9
 10# Uncomment the below to debug problems with driver probing
 11: '
 12ls -l /dev/dri/
 13cat /sys/kernel/debug/devices_deferred
 14cat /sys/kernel/debug/device_component/*
 15'
 16
 17# Dump drm state to confirm that kernel was able to find a connected display:
 18set +e
 19cat /sys/kernel/debug/dri/*/state
 20set -e
 21
 22mkdir -p /lib/modules
 23case "$DRIVER_NAME" in
 24    amdgpu|vkms)
 25        # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
 26        mv /install/modules/lib/modules/* /lib/modules/. || true
 27        modprobe --first-time $DRIVER_NAME
 28        ;;
 29esac
 30
 31if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
 32    IGT_SKIPS="--skips /install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt"
 33fi
 34
 35if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" ]; then
 36    IGT_FLAKES="--flakes /install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt"
 37fi
 38
 39if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" ]; then
 40    IGT_FAILS="--baseline /install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt"
 41fi
 42
 43if [ "`uname -m`" = "aarch64" ]; then
 44    ARCH="arm64"
 45elif [ "`uname -m`" = "armv7l" ]; then
 46    ARCH="arm"
 47else
 48    ARCH="x86_64"
 49fi
 50
 51curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s $PIPELINE_ARTIFACTS_BASE/$ARCH/igt.tar.gz | tar --zstd -v -x -C /
 52
 53TESTLIST="/igt/libexec/igt-gpu-tools/ci-testlist.txt"
 54
 55# If the job is parallel at the gitab job level, take the corresponding fraction
 56# of the caselist.
 57if [ -n "$CI_NODE_INDEX" ]; then
 58    sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
 59fi
 60
 61# core_getversion checks if the driver is loaded and probed correctly
 62# so run it in all shards
 63if ! grep -q "core_getversion" $TESTLIST; then
 64    # Add the line to the file
 65    echo "core_getversion" >> $TESTLIST
 66fi
 67
 68set +e
 69igt-runner \
 70    run \
 71    --igt-folder /igt/libexec/igt-gpu-tools \
 72    --caselist $TESTLIST \
 73    --output $RESULTS_DIR \
 74    -vvvv \
 75    $IGT_SKIPS \
 76    $IGT_FLAKES \
 77    $IGT_FAILS \
 78    --jobs 1
 79ret=$?
 80set -e
 81
 82deqp-runner junit \
 83   --testsuite IGT \
 84   --results $RESULTS_DIR/failures.csv \
 85   --output $RESULTS_DIR/junit.xml \
 86   --limit 50 \
 87   --template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
 88
 89# Check if /proc/lockdep_stats exists
 90if [ -f /proc/lockdep_stats ]; then
 91    # If debug_locks is 0, it indicates lockdep is detected and it turns itself off.
 92    debug_locks=$(grep 'debug_locks:' /proc/lockdep_stats | awk '{print $2}')
 93    if [ "$debug_locks" -eq 0 ] && [ "$ret" -eq 0 ]; then
 94        echo "Warning: LOCKDEP issue detected. Please check dmesg logs for more information."
 95        cat /proc/lockdep_stats
 96        ret=101
 97    fi
 98fi
 99
100cd $oldpath
101exit $ret
~/ Read-only file preview.