public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Cedric Hombourger' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>
Subject: [PATCH 4/4] CI: check if the build fails when dracut fails
Date: Sat,  1 Nov 2025 12:13:17 +0100	[thread overview]
Message-ID: <20251101111326.600581-5-cedric.hombourger@siemens.com> (raw)
In-Reply-To: <20251101111326.600581-1-cedric.hombourger@siemens.com>

The build should not succeed if dracut fails to generate an
initrd. Amend the dracut command line to add an invalid option
(--unknown-option) to force a build failure and check that
bitbake does fail (it did not in the "Add support for dracut"
patch series v5).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 testsuite/citest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 7f046a7f..e53dfa9b 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -324,6 +324,14 @@ class InitRdTest(InitRdBaseTest):
         self.init()
         self.perform_build_test(['mc:qemuamd64-bookworm:isar-dracut'])
 
+    def test_dracut_build_failure(self):
+        """ Check if the build fails if dracut fails to generate an initrd."""
+        lines = InitRdBaseTest.DRACUT_CONF
+        lines.append("ROOTFS_INITRAMFS_GENERATOR_CMDLINE:append = ' --unknown-option'")
+        self.init()
+        self.perform_build_test('mc:qemuamd64-bookworm:isar-image-ci',
+                                should_fail=True, lines=lines)
+
 
 class InitRdCrossTests(InitRdBaseTest):
     """
-- 
2.47.3

-- 
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/20251101111326.600581-5-cedric.hombourger%40siemens.com.

      parent reply	other threads:[~2025-11-01 11:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-01 11:13 [PATCH 0/4] Add test-cases for dracut-based initrds 'Cedric Hombourger' via isar-users
2025-11-01 11:13 ` [PATCH 1/4] CI: support negative build tests 'Cedric Hombourger' via isar-users
2025-11-01 11:13 ` [PATCH 2/4] CI: add smoke-tests for switch to dracut in isar-image-ci 'Cedric Hombourger' via isar-users
2025-11-01 11:13 ` [PATCH 3/4] CI: add build tests for isar-dracut initrd images 'Cedric Hombourger' via isar-users
2025-11-01 11:13 ` 'Cedric Hombourger' via isar-users [this message]

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