[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250417030439.737924-3-vignesh.raman@collabora.com>
Date: Thu, 17 Apr 2025 08:34:35 +0530
From: Vignesh Raman <vignesh.raman@...labora.com>
To: dri-devel@...ts.freedesktop.org
Cc: daniels@...labora.com,
daniel@...ishbar.org,
helen.fornazier@...il.com,
airlied@...il.com,
simona.vetter@...ll.ch,
robdclark@...il.com,
guilherme.gallo@...labora.com,
sergi.blanch.torne@...labora.com,
valentine.burley@...labora.com,
lumag@...nel.org,
dmitry.baryshkov@....qualcomm.com,
quic_abhinavk@...cinc.com,
mripard@...nel.org,
maarten.lankhorst@...ux.intel.com,
tzimmermann@...e.de,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 2/2] 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@...labora.com>
Reviewed-by: Maxime Ripard <mripard@...nel.org>
---
v3:
- Add KUnit tests to the kunit stage.
v2:
- Use LLVM/Clang instead of GCC to avoid architecture-specific
toolchains for cross-compiling.
---
drivers/gpu/drm/ci/gitlab-ci.yml | 2 ++
drivers/gpu/drm/ci/kunit.sh | 11 +++++++++++
drivers/gpu/drm/ci/kunit.yml | 33 ++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)
create mode 100755 drivers/gpu/drm/ci/kunit.sh
create mode 100644 drivers/gpu/drm/ci/kunit.yml
diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
index ac2f498cfe5a..a9fc355c2ff5 100644
--- a/drivers/gpu/drm/ci/gitlab-ci.yml
+++ b/drivers/gpu/drm/ci/gitlab-ci.yml
@@ -109,6 +109,7 @@ include:
- drivers/gpu/drm/ci/build.yml
- drivers/gpu/drm/ci/test.yml
- drivers/gpu/drm/ci/check-devicetrees.yml
+ - drivers/gpu/drm/ci/kunit.yml
- 'https://gitlab.freedesktop.org/gfx-ci/lab-status/-/raw/main/lab-status.yml'
@@ -119,6 +120,7 @@ stages:
- build-for-tests
- build-only
- static-checks
+ - kunit
- code-validation
- amdgpu
- i915
diff --git a/drivers/gpu/drm/ci/kunit.sh b/drivers/gpu/drm/ci/kunit.sh
new file mode 100755
index 000000000000..90b8713ce7a2
--- /dev/null
+++ b/drivers/gpu/drm/ci/kunit.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# SPDX-License-Identifier: MIT
+
+set -euxo pipefail
+
+: "${KERNEL_ARCH:?ERROR: KERNEL_ARCH must be set}"
+
+./tools/testing/kunit/kunit.py run \
+ --arch "${KERNEL_ARCH}" \
+ --make_option LLVM=1 \
+ --kunitconfig=drivers/gpu/drm/tests
diff --git a/drivers/gpu/drm/ci/kunit.yml b/drivers/gpu/drm/ci/kunit.yml
new file mode 100644
index 000000000000..37ab9cc2c9a8
--- /dev/null
+++ b/drivers/gpu/drm/ci/kunit.yml
@@ -0,0 +1,33 @@
+.kunit-packages: &kunit-packages
+ - apt-get update -qq
+ - apt-get install -y --no-install-recommends clang lld llvm
+
+.kunit-base:
+ stage: kunit
+ timeout: "30m"
+ script:
+ - drivers/gpu/drm/ci/kunit.sh
+
+kunit:arm32:
+ extends:
+ - .build:arm32
+ - .kunit-base
+ before_script:
+ - *kunit-packages
+ - apt-get install -y --no-install-recommends qemu-system-arm
+
+kunit:arm64:
+ extends:
+ - .build:arm64
+ - .kunit-base
+ before_script:
+ - *kunit-packages
+ - apt-get install -y --no-install-recommends qemu-system-aarch64
+
+kunit:x86_64:
+ extends:
+ - .build:x86_64
+ - .kunit-base
+ before_script:
+ - *kunit-packages
+ - apt-get install -y --no-install-recommends qemu-system-x86
--
2.47.2
Powered by blists - more mailing lists