From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: openembedded-core@lists.openembedded.org
Cc: Mikko Rapeli <mikko.rapeli@linaro.org>
Subject: [PATCH v9 07/11] oeqa selftest wic.py: add TEST_RUNQEMUPARAMS to runqemu
Date: Thu, 17 Oct 2024 11:45:48 +0300 [thread overview]
Message-ID: <20241017084552.182136-8-mikko.rapeli@linaro.org> (raw)
In-Reply-To: <20241017084552.182136-1-mikko.rapeli@linaro.org>
To support "slirp" networking on shared build machines instead
of tun/tap devices. Users can set
TEST_RUNQEMUPARAMS = "slirp"
in their build/conf/local.conf to run selftests using "slirp"
networking. The same works for testimage.bbclass and oeqa runtime
tests.
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
meta/lib/oeqa/selftest/cases/wic.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index b616759209..f2a46c965b 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -939,7 +939,8 @@ class Wic2(WicTestCase):
bitbake('wic-image-minimal')
self.remove_config(config)
- with runqemu('wic-image-minimal', ssh=False, runqemuparams='nographic') as qemu:
+ runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', 'wic-image-minimal') or ""
+ with runqemu('wic-image-minimal', ssh=False, runqemuparams='%s nographic' % (runqemu_params)) as qemu:
cmd = "mount | grep '^/dev/' | cut -f1,3 -d ' ' | egrep -c -e '/dev/sda1 /boot' " \
"-e '/dev/root /|/dev/sda2 /' -e '/dev/sda3 /media' -e '/dev/sda4 /mnt'"
status, output = qemu.run_serial(cmd)
@@ -959,8 +960,9 @@ class Wic2(WicTestCase):
bitbake('core-image-minimal ovmf')
self.remove_config(config)
+ runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', 'core-image-minimal') or ""
with runqemu('core-image-minimal', ssh=False,
- runqemuparams='nographic ovmf', image_fstype='wic') as qemu:
+ runqemuparams='%s nographic ovmf' % (runqemu_params), image_fstype='wic') as qemu:
cmd = "grep sda. /proc/partitions |wc -l"
status, output = qemu.run_serial(cmd)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
@@ -1154,8 +1156,9 @@ class Wic2(WicTestCase):
bitbake('core-image-minimal-mtdutils')
self.remove_config(config)
+ runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', 'core-image-minimal-mtdutils') or ""
with runqemu('core-image-minimal-mtdutils', ssh=False,
- runqemuparams='nographic', image_fstype='wic') as qemu:
+ runqemuparams='%s nographic' % (runqemu_params), image_fstype='wic') as qemu:
cmd = "grep sda. /proc/partitions |wc -l"
status, output = qemu.run_serial(cmd)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
@@ -1214,8 +1217,9 @@ class Wic2(WicTestCase):
bitbake('core-image-minimal')
self.remove_config(config)
+ runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', 'core-image-minimal') or ""
with runqemu('core-image-minimal', ssh=False,
- runqemuparams='nographic', image_fstype='wic') as qemu:
+ runqemuparams='%s nographic' % (runqemu_params), image_fstype='wic') as qemu:
# Check that we have ONLY two /dev/sda* partitions (/boot and /)
cmd = "grep sda. /proc/partitions | wc -l"
status, output = qemu.run_serial(cmd)
@@ -1446,8 +1450,8 @@ class Wic2(WicTestCase):
os.rename(image_path, image_path + '.bak')
os.rename(new_image_path, image_path)
- # Check if it boots in qemu
- with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu:
+ runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', 'core-image-minimal') or ""
+ with runqemu('core-image-minimal', ssh=False, runqemuparams='%s nographic' % (runqemu_params)) as qemu:
cmd = "ls /etc/"
status, output = qemu.run_serial('true')
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
--
2.34.1
next prev parent reply other threads:[~2024-10-17 8:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 8:45 [PATCH v9 00/11] systemd uki support Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 01/11] uki.bbclass: add class for building Unified Kernel Images (UKI) Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 02/11] wic bootimg-efi.py: keep timestamps and add debug prints Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 03/11] wic bootimg-efi.py: change UKI support from wic plugin to uki.bbclass Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 04/11] oeqa selftest uki.py: add tests for uki.bbclass Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 05/11] oeqa selftest efibootpartition.py: add TEST_RUNQEMUPARAMS to runqemu Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 06/11] oeqa selftest efibootpartition.py: remove systemd-boot from grub-efi test Mikko Rapeli
2024-10-17 8:45 ` Mikko Rapeli [this message]
2024-10-17 8:45 ` [PATCH v9 08/11] oeqa selftest wic.py: support UKIs via uki.bbclass Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 09/11] oeqa data.py: add skipIfNotBuildArch decorator Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 10/11] oeqa selftest wic.py: mark efi tests to run on x86_64 build host only Mikko Rapeli
2024-10-17 8:45 ` [PATCH v9 11/11] oeqa selftest wic.py: fix missing ext4 image Mikko Rapeli
2024-10-22 10:26 ` [OE-core] [PATCH v9 00/11] systemd uki support Ross Burton
2024-10-22 19:34 ` Mikko Rapeli
2024-10-22 19:54 ` Richard Purdie
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=20241017084552.182136-8-mikko.rapeli@linaro.org \
--to=mikko.rapeli@linaro.org \
--cc=openembedded-core@lists.openembedded.org \
/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