diff mbox series

[v2,3/9] selftest runtime_test.py: add testimage.bbclass slirp test

Message ID 20230823061025.3952909-3-mikko.rapeli@linaro.org
State New
Headers show
Series [v2,1/9] core-image-minimal: increase extra space to pass df.py oeqa runtime test | expand

Commit Message

Mikko Rapeli Aug. 23, 2023, 6:10 a.m. UTC
Builds core-image-minimal with testimage.bbclass and an ssh server
and then runs tests with slirp networking. Default test suite must
pass.

With full caches on x86_64 with x86_64 target the test passes in 416 seconds:

2023-08-21 09:01:12,295 - oe-selftest - INFO - Ran 1 test in 464.955s
2023-08-21 09:01:12,295 - oe-selftest - INFO - OK
2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS:
2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS - runtime_test.TestImage.test_testimage_slirp: PASSED (416.62s)
2023-08-21 09:01:19,711 - oe-selftest - INFO - SUMMARY:
2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 464.956s
2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

v2: use :append instead of overwriting variables

v1: https://lists.openembedded.org/g/openembedded-core/message/186427

Comments

Alexander Kanavin Aug. 23, 2023, 6:45 p.m. UTC | #1
I guess the extra space stuff should be going here instead?

Alex

On Wed, 23 Aug 2023 at 08:10, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
>
> Builds core-image-minimal with testimage.bbclass and an ssh server
> and then runs tests with slirp networking. Default test suite must
> pass.
>
> With full caches on x86_64 with x86_64 target the test passes in 416 seconds:
>
> 2023-08-21 09:01:12,295 - oe-selftest - INFO - Ran 1 test in 464.955s
> 2023-08-21 09:01:12,295 - oe-selftest - INFO - OK
> 2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS:
> 2023-08-21 09:01:19,648 - oe-selftest - INFO - RESULTS - runtime_test.TestImage.test_testimage_slirp: PASSED (416.62s)
> 2023-08-21 09:01:19,711 - oe-selftest - INFO - SUMMARY:
> 2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 464.956s
> 2023-08-21 09:01:19,711 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0)
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta/lib/oeqa/selftest/cases/runtime_test.py | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> v2: use :append instead of overwriting variables
>
> v1: https://lists.openembedded.org/g/openembedded-core/message/186427
>
> diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
> index 463679dd32..19c8f0e9ec 100644
> --- a/meta/lib/oeqa/selftest/cases/runtime_test.py
> +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
> @@ -129,6 +129,21 @@ class TestImage(OESelftestTestCase):
>          bitbake('core-image-full-cmdline socat')
>          bitbake('-c testimage core-image-full-cmdline')
>
> +    def test_testimage_slirp(self):
> +        """
> +        Summary: Check basic testimage functionality with qemu and slirp networking.
> +        """
> +
> +        features = '''
> +IMAGE_CLASSES:append = " testimage"
> +IMAGE_FEATURES:append = " ssh-server-dropbear"
> +TEST_RUNQEMUPARAMS:append = " slirp"
> +'''
> +        self.write_config(features)
> +
> +        bitbake('core-image-minimal')
> +        bitbake('-c testimage core-image-minimal')
> +
>      def test_testimage_dnf(self):
>          """
>          Summary: Check package feeds functionality for dnf
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#186550): https://lists.openembedded.org/g/openembedded-core/message/186550
> Mute This Topic: https://lists.openembedded.org/mt/100910039/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Mikko Rapeli Aug. 24, 2023, 6:41 a.m. UTC | #2
Hi,

On Wed, Aug 23, 2023 at 08:45:49PM +0200, Alexander Kanavin wrote:
> I guess the extra space stuff should be going here instead?

Or some other image which is supposed to be compatible with oeqa runtime tests
and testimage.bbclass. I think it's better to just ignore this patch.

Cheers,

-Mikko
Alexander Kanavin Aug. 24, 2023, 6:58 a.m. UTC | #3
On Thu, 24 Aug 2023 at 08:41, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> On Wed, Aug 23, 2023 at 08:45:49PM +0200, Alexander Kanavin wrote:
> > I guess the extra space stuff should be going here instead?
>
> Or some other image which is supposed to be compatible with oeqa runtime tests
> and testimage.bbclass. I think it's better to just ignore this patch.

It's a useful test, and core-image-minimal is entirely valid image for
testing (it's used throughout autobuilder and selftest). The point is
simply that if you need to customize that image or any other image for
the purposes of the test, all such customizations should be collected
in the test itself.

Alex
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 463679dd32..19c8f0e9ec 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -129,6 +129,21 @@  class TestImage(OESelftestTestCase):
         bitbake('core-image-full-cmdline socat')
         bitbake('-c testimage core-image-full-cmdline')
 
+    def test_testimage_slirp(self):
+        """
+        Summary: Check basic testimage functionality with qemu and slirp networking.
+        """
+
+        features = '''
+IMAGE_CLASSES:append = " testimage"
+IMAGE_FEATURES:append = " ssh-server-dropbear"
+TEST_RUNQEMUPARAMS:append = " slirp"
+'''
+        self.write_config(features)
+
+        bitbake('core-image-minimal')
+        bitbake('-c testimage core-image-minimal')
+
     def test_testimage_dnf(self):
         """
         Summary: Check package feeds functionality for dnf