public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "chris.larson via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>,
	Christopher Larson <chris.larson@siemens.com>
Subject: [PATCH 4/4] testsuite: add a test for per_kernel support
Date: Fri, 11 Apr 2025 13:08:52 -0700	[thread overview]
Message-ID: <20250411200852.51967-5-chris.larson@siemens.com> (raw)
In-Reply-To: <20250411200852.51967-1-chris.larson@siemens.com>

From: Christopher Larson <chris.larson@siemens.com>

This is a build test for the per-kernel support. It will build a kernel module for
multiple kernels, and install all of the kernel modules in the test image.

Signed-off-by: Christopher Larson <chris.larson@siemens.com>
---
 testsuite/citest.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index a5661eac..4b32b849 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -205,6 +205,28 @@ def test_cross_rpi(self):
         self.perform_build_test(targets)
 
 
+class KernelTests(CIBaseTest):
+    """
+    Tests associated with kernel builds and development.
+    :avocado: tags=kernel,full
+    """
+
+    def test_per_kernel(self):
+        """Test per-kernel recipe variants for external kernel modules."""
+
+        targets = ['mc:qemuarm64-bookworm:isar-image-ci']
+        kernel_names = self.params.get('kernel_names', default='mainline')
+        kernel_names = [k.strip() for k in kernel_names.split(',') if k.strip()]
+        modules = [f"example-module-{k}" for k in kernel_names]
+        modules.append('example-module-${KERNEL_NAME}')
+        kernel_names = ' '.join(sorted(kernel_names))
+        lines = [
+            f"KERNEL_NAMES:append = ' {kernel_names}'",
+        ]
+        self.init()
+        self.perform_build_test(targets, image_install=' '.join(modules), lines=lines)
+
+
 class WicTest(CIBaseTest):
 
     """
-- 
2.47.2

-- 
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/20250411200852.51967-5-chris.larson%40siemens.com.

  parent reply	other threads:[~2025-04-11 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11 20:08 [PATCHv2 0/4] Add support for per-kernel recipe variants chris.larson via isar-users
2025-04-11 20:08 ` [PATCH 1/4] per-kernel.bbclass: add class chris.larson via isar-users
2025-04-11 20:08 ` [PATCH 2/4] linux-module: inherit per-kernel chris.larson via isar-users
2025-04-11 20:08 ` [PATCH 3/4] testsuite: add 'extra_lines' argument to configure chris.larson via isar-users
2025-04-11 20:08 ` chris.larson via isar-users [this message]
2025-04-11 20:10 ` [PATCHv2 0/4] Add support for per-kernel recipe variants 'Larson, Chris' via isar-users

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=20250411200852.51967-5-chris.larson@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=cedric.hombourger@siemens.com \
    --cc=chris.larson@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