similarity index 93%
copy from meta/recipes-kernel/kselftest/kselftest.inc
copy to meta/classes-recipe/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"
@@ -1,53 +1,13 @@
-# Kselftest package for Linux
+# Transitional include for 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 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 kselftest\""
}
+addtask warn_custom_inc before do_unpack