Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Gyorgy Sarvari <skandigraun@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
Date: Wed, 16 Apr 2025 19:23:16 +0200	[thread overview]
Message-ID: <69747a29-2c7d-471f-8c2e-acbda9c3146c@gmail.com> (raw)
In-Reply-To: <20250416164134.399-1-thune.a.tran@boeing.com>

The same issue is also present for sdkext - since you are already on
this, do you think you could make that work too?

On 4/16/25 18:41, Thune Tran via lists.openembedded.org wrote:
> The testsdk task only loads SDK tests from the openembedded-core
> layer's meta/lib/oeqa/sdk/cases/.
>
> This patch implements test discovery to include SDK tests from all
> configured layers that mirror <LAYER_DIR>/lib/oeqa/sdk/cases/. The
> implementation mirrors get_runtime_paths() in meta/classes-recipe/testimage.
>
> Tested by:
>
> 1. Adding SDK test cases to <LAYER_DIR>/lib/oeqa/sdk/cases/ and
>    verifying they are discovered and executed with no errors.
> 2. Verifying existing SDK test cases in openembedded-core layer
>    are discovered and executed with no errors.
>
> Signed-off-by: Thune Tran <thune.a.tran@boeing.com>
> Signed-off-by: Chuck Wolber <chuck.wolber@boeing.com>
> ---
>  meta/lib/oeqa/sdk/testsdk.py | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
> index 518b09febb..505add8f8c 100644
> --- a/meta/lib/oeqa/sdk/testsdk.py
> +++ b/meta/lib/oeqa/sdk/testsdk.py
> @@ -31,6 +31,20 @@ class TestSDK(TestSDKBase):
>      context_class = OESDKTestContext
>      test_type = 'sdk'
>  
> +    def get_sdk_paths(self, d):
> +        """
> +        Returns a list of paths where SDK test must reside.
> +
> +        SDK tests are expected in <LAYER_DIR>/lib/oeqa/sdk/cases/
> +        """
> +        paths = []
> +
> +        for layer in d.getVar('BBLAYERS').split():
> +            path = os.path.join(layer, 'lib/oeqa/sdk/cases')
> +            if os.path.isdir(path):
> +                paths.append(path)
> +        return paths
> +
>      def get_tcname(self, d):
>          """
>          Get the name of the SDK file
> @@ -114,7 +128,7 @@ class TestSDK(TestSDKBase):
>                  host_pkg_manifest=host_pkg_manifest, **context_args)
>  
>              try:
> -                tc.loadTests(self.context_executor_class.default_cases)
> +                tc.loadTests(self.get_sdk_paths(d))
>              except Exception as e:
>                  import traceback
>                  bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#215001): https://lists.openembedded.org/g/openembedded-core/message/215001
> Mute This Topic: https://lists.openembedded.org/mt/112298220/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2025-04-16 17:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 16:41 [PATCH] oeqa/sdk/sdktest: Add test discovery across layers Thune Tran
2025-04-16 17:23 ` Gyorgy Sarvari [this message]
2025-04-16 20:54   ` [OE-core] " Tran (US), Thune A
2025-04-16 21:16     ` Gyorgy Sarvari
2025-04-16 22:07 ` Richard Purdie
2025-04-17  4:39   ` Chuck Wolber
2025-04-17 10:06     ` Gyorgy Sarvari
2025-04-17 11:04     ` Richard Purdie
2025-04-17 12:54       ` Tran (US), Thune A
2025-04-17 13:03         ` Richard Purdie
2025-04-17 15:53           ` Tran (US), Thune A
     [not found]           ` <18372610739395C0.11203@lists.openembedded.org>
2025-04-21 19:21             ` Tran (US), Thune A

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=69747a29-2c7d-471f-8c2e-acbda9c3146c@gmail.com \
    --to=skandigraun@gmail.com \
    --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