Commit 0493be3b authored by Vignesh Raman's avatar Vignesh Raman Committed by Helen Koike

drm/ci: generate testlist from build

Stop vendoring the testlist into the kernel. Instead, use the
testlist from the IGT build to ensure we do not miss renamed
or newly added tests.
Signed-off-by: default avatarVignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240529024049.356327-4-vignesh.raman@collabora.com
parent 9c521934
...@@ -3,6 +3,30 @@ ...@@ -3,6 +3,30 @@
set -ex set -ex
function generate_testlist {
set +x
while read -r line; do
if [ "$line" = "TESTLIST" ] || [ "$line" = "END TESTLIST" ]; then
continue
fi
tests=$(echo "$line" | tr ' ' '\n')
for test in $tests; do
output=$(/igt/libexec/igt-gpu-tools/"$test" --list-subtests || true)
if [ -z "$output" ]; then
echo "$test"
else
echo "$output" | while read -r subtest; do
echo "$test@$subtest"
done
fi
done
done < /igt/libexec/igt-gpu-tools/test-list.txt > /igt/libexec/igt-gpu-tools/ci-testlist.txt
set -x
}
git clone https://gitlab.freedesktop.org/drm/igt-gpu-tools.git --single-branch --no-checkout git clone https://gitlab.freedesktop.org/drm/igt-gpu-tools.git --single-branch --no-checkout
cd igt-gpu-tools cd igt-gpu-tools
git checkout $IGT_VERSION git checkout $IGT_VERSION
...@@ -26,6 +50,17 @@ meson build $MESON_OPTIONS $EXTRA_MESON_ARGS ...@@ -26,6 +50,17 @@ meson build $MESON_OPTIONS $EXTRA_MESON_ARGS
ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1 ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
ninja -C build install ninja -C build install
if [[ "$KERNEL_ARCH" = "arm64" ]]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib/aarch64-linux-gnu
elif [[ "$KERNEL_ARCH" = "arm" ]]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib64
fi
echo "Generating ci-testlist.txt"
generate_testlist
mkdir -p artifacts/ mkdir -p artifacts/
tar -cf artifacts/igt.tar /igt tar -cf artifacts/igt.tar /igt
......
...@@ -59,25 +59,26 @@ fi ...@@ -59,25 +59,26 @@ 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 / 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 /
TESTLIST="/igt/libexec/igt-gpu-tools/ci-testlist.txt"
# If the job is parallel at the gitab job level, take the corresponding fraction # If the job is parallel at the gitab job level, take the corresponding fraction
# of the caselist. # of the caselist.
if [ -n "$CI_NODE_INDEX" ]; then if [ -n "$CI_NODE_INDEX" ]; then
sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /install/testlist.txt sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
fi fi
# core_getversion checks if the driver is loaded and probed correctly # core_getversion checks if the driver is loaded and probed correctly
# so run it in all shards # so run it in all shards
if ! grep -q "core_getversion" /install/testlist.txt; then if ! grep -q "core_getversion" $TESTLIST; then
# Add the line to the file # Add the line to the file
echo "core_getversion" >> /install/testlist.txt echo "core_getversion" >> $TESTLIST
fi fi
set +e set +e
igt-runner \ igt-runner \
run \ run \
--igt-folder /igt/libexec/igt-gpu-tools \ --igt-folder /igt/libexec/igt-gpu-tools \
--caselist /install/testlist.txt \ --caselist $TESTLIST \
--output /results \ --output /results \
$IGT_SKIPS \ $IGT_SKIPS \
$IGT_FLAKES \ $IGT_FLAKES \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment