Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/ci: Add jobs to run KUnit tests

Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Acked-by: Helen Koike <helen.fornazier@gmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250623085033.39680-3-vignesh.raman@collabora.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Vignesh Raman and committed by
Maxime Ripard
786bd08c deac70ab

+55
+2
drivers/gpu/drm/ci/gitlab-ci.yml
··· 111 111 - drivers/gpu/drm/ci/build.yml 112 112 - drivers/gpu/drm/ci/test.yml 113 113 - drivers/gpu/drm/ci/check-devicetrees.yml 114 + - drivers/gpu/drm/ci/kunit.yml 114 115 - 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml' 115 116 116 117 ··· 122 121 - build-for-tests 123 122 - build-only 124 123 - static-checks 124 + - kunit 125 125 - code-validation 126 126 - amdgpu 127 127 - i915
+16
drivers/gpu/drm/ci/kunit.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: MIT 3 + 4 + set -euxo pipefail 5 + 6 + : "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}" 7 + : "${LLVM_VERSION:?ERROR: LLVM_VERSION must be set}" 8 + 9 + ./drivers/gpu/drm/ci/setup-llvm-links.sh 10 + 11 + export PATH="/usr/bin:$PATH" 12 + 13 + ./tools/testing/kunit/kunit.py run \ 14 + --arch "${KERNEL_ARCH}" \ 15 + --make_options LLVM=1 \ 16 + --kunitconfig=drivers/gpu/drm/tests
+37
drivers/gpu/drm/ci/kunit.yml
··· 1 + .kunit-packages: &kunit-packages 2 + - apt-get update -qq 3 + # Minimum supported version of LLVM for building x86 kernels is 15.0.0. 4 + # In mesa-ci containers, LLVM_VERSION is defined as a container-level property and is currently set to 19. 5 + - apt-get install -y --no-install-recommends clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} 6 + 7 + .kunit-base: 8 + stage: kunit 9 + timeout: "30m" 10 + variables: 11 + GIT_DEPTH: 1 12 + script: 13 + - drivers/gpu/drm/ci/kunit.sh 14 + 15 + kunit:arm32: 16 + extends: 17 + - .build:arm32 18 + - .kunit-base 19 + before_script: 20 + - *kunit-packages 21 + - apt-get install -y --no-install-recommends qemu-system-arm 22 + 23 + kunit:arm64: 24 + extends: 25 + - .build:arm64 26 + - .kunit-base 27 + before_script: 28 + - *kunit-packages 29 + - apt-get install -y --no-install-recommends qemu-system-aarch64 30 + 31 + kunit:x86_64: 32 + extends: 33 + - .build:x86_64 34 + - .kunit-base 35 + before_script: 36 + - *kunit-packages 37 + - apt-get install -y --no-install-recommends qemu-system-x86