mirror of
https://git.yoctoproject.org/poky
synced 2026-07-02 23:27:27 +00:00
ff06a1b425
At the moment we can't run this test inside an eSDK as it needs the kernel-devsrc recipe to be present. Skip the test until this has been resolved. (From OE-Core rev: f83beee6e63d25ef2b17618a85f9ad6ca0898600) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1.6 KiB
Python
40 lines
1.6 KiB
Python
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
import os
|
|
import subprocess
|
|
import tempfile
|
|
|
|
from oeqa.sdk.case import OESDKTestCase
|
|
from oeqa.sdkext.context import OESDKExtTestContext
|
|
from oeqa.utils.subprocesstweak import errors_have_output
|
|
errors_have_output()
|
|
|
|
class KernelModuleTest(OESDKTestCase):
|
|
"""
|
|
Test that out-of-tree kernel modules build.
|
|
"""
|
|
def test_cryptodev(self):
|
|
if isinstance(self.tc, OESDKExtTestContext):
|
|
self.skipTest(f"{self.id()} does not support eSDK (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15850)")
|
|
|
|
self.ensure_target_package("kernel-devsrc")
|
|
# These targets need to be built before kernel modules can be built.
|
|
self._run("make -j -C $OECORE_TARGET_SYSROOT/usr/src/kernel prepare scripts")
|
|
|
|
with tempfile.TemporaryDirectory(prefix="cryptodev", dir=self.tc.sdk_dir) as testdir:
|
|
git_url = "https://github.com/cryptodev-linux/cryptodev-linux"
|
|
# This is a knnown-good commit post-1.13 that builds with kernel 6.7+
|
|
git_sha = "bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f"
|
|
|
|
sourcedir = os.path.join(testdir, "cryptodev-linux")
|
|
subprocess.check_output(["git", "clone", git_url, sourcedir], stderr=subprocess.STDOUT)
|
|
self.assertTrue(os.path.isdir(sourcedir))
|
|
subprocess.check_output(["git", "-C", sourcedir, "checkout", git_sha], stderr=subprocess.STDOUT)
|
|
|
|
self._run("make -C %s V=1 KERNEL_DIR=$OECORE_TARGET_SYSROOT/usr/src/kernel" % sourcedir)
|
|
self.check_elf(os.path.join(sourcedir, "cryptodev.ko"))
|