diff mbox series

[v3] selftests: add test_minidebuginfo_qemu

Message ID 20240606120651.1158780-1-ecordonnier@snap.com
State Accepted, archived
Commit 377603886f0d975ec23f32ee462693d4e3370aaf
Headers show
Series [v3] selftests: add test_minidebuginfo_qemu | expand

Commit Message

Etienne Cordonnier June 6, 2024, 12:06 p.m. UTC
From: Etienne Cordonnier <ecordonnier@snap.com>

test_systemd_coredump_minidebuginfo was getting skipped in CI, because the feature isn't enabled per default in any image at the moment.
Add this selftest so that test_systemd_coredump_minidebuginfo gets executed in CI.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 meta/lib/oeqa/selftest/cases/minidebuginfo.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Etienne Cordonnier June 6, 2024, 12:07 p.m. UTC | #1
v3 of the patch: use INIT_MANAGER="systemd" instead of multiple other
variables.

On Thu, Jun 6, 2024 at 2:06 PM <ecordonnier@snap.com> wrote:

> From: Etienne Cordonnier <ecordonnier@snap.com>
>
> test_systemd_coredump_minidebuginfo was getting skipped in CI, because the
> feature isn't enabled per default in any image at the moment.
> Add this selftest so that test_systemd_coredump_minidebuginfo gets
> executed in CI.
>
> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> ---
>  meta/lib/oeqa/selftest/cases/minidebuginfo.py | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/meta/lib/oeqa/selftest/cases/minidebuginfo.py
> b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
> index 2919f07939..a8923460f9 100644
> --- a/meta/lib/oeqa/selftest/cases/minidebuginfo.py
> +++ b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
> @@ -8,6 +8,7 @@ import subprocess
>  import tempfile
>  import shutil
>
> +from oeqa.core.decorator import OETestTag
>  from oeqa.selftest.case import OESelftestTestCase
>  from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runCmd
>
> @@ -42,3 +43,18 @@ IMAGE_FSTYPES = "tar.bz2"
>                      native_sysroot = native_sysroot, target_sys =
> target_sys)
>              self.assertIn(".gnu_debugdata", r.output)
>
> +    @OETestTag("runqemu")
> +    def test_minidebuginfo_qemu(self):
> +        """
> +        Test minidebuginfo inside a qemu.
> +        This runs test_systemd_coredump_minidebuginfo and other
> minidebuginfo runtime tests which may be added in the future.
> +        """
> +
> +        self.write_config("""
> +DISTRO_FEATURES:append = " minidebuginfo"
> +INIT_MANAGER = "systemd"
> +IMAGE_CLASSES += "testimage"
> +TEST_SUITES = "ping ssh systemd"
> +        """)
> +        bitbake('core-image-minimal')
> +        bitbake('-c testimage core-image-minimal')
> --
> 2.36.1.vfs.0.0
>
>
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/minidebuginfo.py b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
index 2919f07939..a8923460f9 100644
--- a/meta/lib/oeqa/selftest/cases/minidebuginfo.py
+++ b/meta/lib/oeqa/selftest/cases/minidebuginfo.py
@@ -8,6 +8,7 @@  import subprocess
 import tempfile
 import shutil
 
+from oeqa.core.decorator import OETestTag
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runCmd
 
@@ -42,3 +43,18 @@  IMAGE_FSTYPES = "tar.bz2"
                     native_sysroot = native_sysroot, target_sys = target_sys)
             self.assertIn(".gnu_debugdata", r.output)
 
+    @OETestTag("runqemu")
+    def test_minidebuginfo_qemu(self):
+        """
+        Test minidebuginfo inside a qemu.
+        This runs test_systemd_coredump_minidebuginfo and other minidebuginfo runtime tests which may be added in the future.
+        """
+
+        self.write_config("""
+DISTRO_FEATURES:append = " minidebuginfo"
+INIT_MANAGER = "systemd"
+IMAGE_CLASSES += "testimage"
+TEST_SUITES = "ping ssh systemd"
+        """)
+        bitbake('core-image-minimal')
+        bitbake('-c testimage core-image-minimal')