Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/drivers/gpu/drm/ci/igt_runner.sh
26494 views
1
#!/bin/sh
2
# SPDX-License-Identifier: MIT
3
4
set -ex
5
6
export IGT_FORCE_DRIVER=${DRIVER_NAME}
7
export PATH=$PATH:/igt/bin/
8
export 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
: '
12
ls -l /dev/dri/
13
cat /sys/kernel/debug/devices_deferred
14
cat /sys/kernel/debug/device_component/*
15
'
16
17
# Dump drm state to confirm that kernel was able to find a connected display:
18
set +e
19
cat /sys/kernel/debug/dri/*/state
20
set -e
21
22
mkdir -p /lib/modules
23
case "$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
;;
29
esac
30
31
if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt" ]; then
32
IGT_SKIPS="--skips /install/xfails/$DRIVER_NAME-$GPU_VERSION-skips.txt"
33
fi
34
35
if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt" ]; then
36
IGT_FLAKES="--flakes /install/xfails/$DRIVER_NAME-$GPU_VERSION-flakes.txt"
37
fi
38
39
if [ -e "/install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt" ]; then
40
IGT_FAILS="--baseline /install/xfails/$DRIVER_NAME-$GPU_VERSION-fails.txt"
41
fi
42
43
if [ "`uname -m`" = "aarch64" ]; then
44
ARCH="arm64"
45
elif [ "`uname -m`" = "armv7l" ]; then
46
ARCH="arm"
47
else
48
ARCH="x86_64"
49
fi
50
51
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s $PIPELINE_ARTIFACTS_BASE/$ARCH/igt.tar.gz | tar --zstd -v -x -C /
52
53
TESTLIST="/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.
57
if [ -n "$CI_NODE_INDEX" ]; then
58
sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
59
fi
60
61
# core_getversion checks if the driver is loaded and probed correctly
62
# so run it in all shards
63
if ! grep -q "core_getversion" $TESTLIST; then
64
# Add the line to the file
65
echo "core_getversion" >> $TESTLIST
66
fi
67
68
set +e
69
igt-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
79
ret=$?
80
set -e
81
82
deqp-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
90
if [ -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
98
fi
99
100
cd $oldpath
101
exit $ret
102
103