From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v3 09/27] kselftest: Migrate to a bbclass
Date: Sun, 30 Nov 2025 10:27:29 +0100 [thread overview]
Message-ID: <243d71f9f16454c6677483b4526a65f578e34387.1764494867.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1764494867.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
"inherit linux-kselftest" is shorter and a more common pattern compared
to OE/yocto. Keep the original .inc file as transitional helper, issuing
a warning when it's used with a migration suggestion.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../linux-kselftest.bbclass} | 5 +-
meta/recipes-kernel/kselftest/kselftest.inc | 52 +++----------------
2 files changed, 9 insertions(+), 48 deletions(-)
copy meta/{recipes-kernel/kselftest/kselftest.inc => classes-recipe/linux-kselftest.bbclass} (93%)
diff --git a/meta/recipes-kernel/kselftest/kselftest.inc b/meta/classes-recipe/linux-kselftest.bbclass
similarity index 93%
copy from meta/recipes-kernel/kselftest/kselftest.inc
copy to meta/classes-recipe/linux-kselftest.bbclass
index 95dece10..ec2d267e 100644
--- a/meta/recipes-kernel/kselftest/kselftest.inc
+++ b/meta/classes-recipe/linux-kselftest.bbclass
@@ -2,13 +2,12 @@
#
# This software is a part of ISAR.
# Copyright (c) Mentor Graphics, a Siemens Business, 2020
+# Copyright (c) Siemens, 2025
#
# SPDX-License-Identifier: MIT
inherit dpkg
-FILESPATH:append := ":${THISDIR}/files"
-
# Some test-cases like memfd compilation failed in cross-compilation.
# Force native compilation for now to have consistent output across
# ISAR native/cross compilation setups.
@@ -33,7 +32,9 @@ DEBIAN_BUILD_DEPENDS ?= " \
llvm:native, \
"
+FILESPATH:append = ":${LAYERDIR_core}/recipes-kernel/kselftest/files"
SRC_URI += "file://rules.tmpl"
+
S = "${WORKDIR}/linux-${PV}"
TEMPLATE_FILES = "rules.tmpl"
diff --git a/meta/recipes-kernel/kselftest/kselftest.inc b/meta/recipes-kernel/kselftest/kselftest.inc
index 95dece10..e9bf5c27 100644
--- a/meta/recipes-kernel/kselftest/kselftest.inc
+++ b/meta/recipes-kernel/kselftest/kselftest.inc
@@ -1,53 +1,13 @@
-# Kselftest package for Linux
+# Transitional include for linux-kselftest.bbclass
#
# This software is a part of ISAR.
-# Copyright (c) Mentor Graphics, a Siemens Business, 2020
+# Copyright (c) Siemens AG, 2025
#
# SPDX-License-Identifier: MIT
-inherit dpkg
+inherit linux-kselftest
-FILESPATH:append := ":${THISDIR}/files"
-
-# Some test-cases like memfd compilation failed in cross-compilation.
-# Force native compilation for now to have consistent output across
-# ISAR native/cross compilation setups.
-ISAR_CROSS_COMPILE = "0"
-
-DESCRIPTION ?= "Kernel selftests from Linux kernel ${PV}"
-
-DEBIAN_BUILD_DEPENDS ?= " \
- rsync, \
- flex, \
- bison, \
- ${@ 'fuse' if d.getVar('BASE_DISTRO_CODENAME') in ['bullseye', 'buster'] else 'fuse3'}, \
- libelf-dev:native, \
- libcap-ng-dev:native, \
- libpopt-dev:native, \
- libcap-dev:native, \
- libmount-dev:native, \
- libfuse-dev:native, \
- libmnl-dev:native, \
- pkg-config, \
- clang:native, \
- llvm:native, \
-"
-
-SRC_URI += "file://rules.tmpl"
-S = "${WORKDIR}/linux-${PV}"
-
-TEMPLATE_FILES = "rules.tmpl"
-TEMPLATE_VARS += "KSELFTEST_ARGS"
-
-KSELFTEST_TARGETS ?= ""
-KSELFTEST_SKIP_TARGETS ?= ""
-KSELFTEST_FORCE_TARGETS ?= "0"
-
-KSELFTEST_ARGS = "${@ "TARGETS=\"${KSELFTEST_TARGETS}\"" if d.getVar('KSELFTEST_TARGETS') else ''}"
-KSELFTEST_ARGS .= "${@ " FORCE_TARGETS=1" if bb.utils.to_boolean(d.getVar('KSELFTEST_FORCE_TARGETS')) else ''}"
-KSELFTEST_ARGS .= "${@ " SKIP_TARGETS=\"${KSELFTEST_SKIP_TARGETS}\"" if d.getVar('KSELFTEST_SKIP_TARGETS') else ''}"
-
-do_prepare_build[cleandirs] += "${S}/debian"
-do_prepare_build() {
- deb_debianize
+do_warn_custom_inc() {
+ bbwarn "Please migrate from \"require recipes-kernel/kselftest/kselftest.inc\" to \"inherit linux-kselftest\""
}
+addtask warn_custom_inc before do_unpack
--
2.51.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/243d71f9f16454c6677483b4526a65f578e34387.1764494867.git.jan.kiszka%40siemens.com.
next prev parent reply other threads:[~2025-11-30 9:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-30 9:27 [PATCH v3 00/27] Use more classes! 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 01/27] linux-custom: Drop redundant template inheritance 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 02/27] meta: Move INHERIT'ed classes into classes-global 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 03/27] meta: Move recipe-pulled classes into classes-recipe 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 04/27] meta-isar: " 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 05/27] linux-custom: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 06/27] meta-isar: Switch to linux-kernel class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 07/27] linux-module: Migrate to a bbclasss 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 08/27] meta-isar: Switch to linux-module class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` 'Jan Kiszka' via isar-users [this message]
2025-11-30 9:27 ` [PATCH v3 10/27] meta-isar: Switch to kselftest class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 11/27] u-boot-custom: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 12/27] meta-isar: Switch to u-boot class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 13/27] optee-os[-tadevkit]-custom: Migrate to bbclass'es 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 14/27] meta-isar: Switch to optee-os[-tadevkit] classes 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 15/27] optee-client: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 16/27] meta-isar: Switch to optee-client class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 17/27] trusted-firmware-a: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 18/27] meta-isar: Switch to trusted-firmware-a class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 19/27] barebox: Add SPDX license identifiers 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 20/27] barebox: Move inherit dpkg into common .inc 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 21/27] barebox: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 22/27] meta-isar: Switch to barebox class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 23/27] initramfs-hook: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 24/27] meta[-isar]: Switch to initramfs-hook class 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 25/27] container-loader: Migrate to bbclass'es 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 26/27] meta-isar: Switch to {docker,podman}-loader classes 'Jan Kiszka' via isar-users
2025-11-30 9:27 ` [PATCH v3 27/27] RECIPES-API-CHANGELOG: Document include to class conversion 'Jan Kiszka' via isar-users
2025-11-30 9:29 ` [PATCH v3 00/27] Use more classes! 'Jan Kiszka' via isar-users
2025-12-03 15:09 ` Zhihang Wei
2025-12-03 15:29 ` 'Kiszka, Jan' via isar-users
2025-12-03 15:32 ` Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=243d71f9f16454c6677483b4526a65f578e34387.1764494867.git.jan.kiszka@siemens.com \
--to=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox