Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
@ 2025-04-16 16:41 Thune Tran
  2025-04-16 17:23 ` [OE-core] " Gyorgy Sarvari
  2025-04-16 22:07 ` Richard Purdie
  0 siblings, 2 replies; 12+ messages in thread
From: Thune Tran @ 2025-04-16 16:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Thune Tran, Chuck Wolber

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())
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-16 16:41 [PATCH] oeqa/sdk/sdktest: Add test discovery across layers Thune Tran
@ 2025-04-16 17:23 ` Gyorgy Sarvari
  2025-04-16 20:54   ` Tran (US), Thune A
  2025-04-16 22:07 ` Richard Purdie
  1 sibling, 1 reply; 12+ messages in thread
From: Gyorgy Sarvari @ 2025-04-16 17:23 UTC (permalink / raw)
  To: openembedded-core

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]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-16 17:23 ` [OE-core] " Gyorgy Sarvari
@ 2025-04-16 20:54   ` Tran (US), Thune A
  2025-04-16 21:16     ` Gyorgy Sarvari
  0 siblings, 1 reply; 12+ messages in thread
From: Tran (US), Thune A @ 2025-04-16 20:54 UTC (permalink / raw)
  To: skandigraun@gmail.com, openembedded-core@lists.openembedded.org

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

Thanks for pointing that out. A quick look at sdkext. It's possible to make 
it work for it. I'm open to submitting a similar patch for sdkext. I'm not 
immediately set up to test it. Would you be able to help verify the patch 
for sdkext and also sign off on it?
> 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())
>> 
>>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-16 20:54   ` Tran (US), Thune A
@ 2025-04-16 21:16     ` Gyorgy Sarvari
  0 siblings, 0 replies; 12+ messages in thread
From: Gyorgy Sarvari @ 2025-04-16 21:16 UTC (permalink / raw)
  To: Tran (US), Thune A, openembedded-core@lists.openembedded.org

On 4/16/25 22:54, Tran (US), Thune A wrote:
>> The same issue is also present for sdkext - since you are already on
>> this, do you think you could make that work too?
> Thanks for pointing that out. A quick look at sdkext. It's possible to make 
> it work for it. I'm open to submitting a similar patch for sdkext. I'm not 
> immediately set up to test it. Would you be able to help verify the patch 
> for sdkext and also sign off on it?

[Just to have it here also, not only in private messages]

Yeah, I think I should be able to do that - I have an extensible sdk set
up, and some classes also that I can use for testing.


>> 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())
>>>
>>>
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-16 16:41 [PATCH] oeqa/sdk/sdktest: Add test discovery across layers Thune Tran
  2025-04-16 17:23 ` [OE-core] " Gyorgy Sarvari
@ 2025-04-16 22:07 ` Richard Purdie
  2025-04-17  4:39   ` Chuck Wolber
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2025-04-16 22:07 UTC (permalink / raw)
  To: thune.a.tran, openembedded-core; +Cc: Chuck Wolber

On Wed, 2025-04-16 at 16:41 +0000, 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())
> 

I suspect this causes some regressions in our automated testing unfortunately:

buildtools:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1396

meta-mingw:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/1430

Cheers,

Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  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
  0 siblings, 2 replies; 12+ messages in thread
From: Chuck Wolber @ 2025-04-17  4:39 UTC (permalink / raw)
  To: richard.purdie; +Cc: thune.a.tran, openembedded-core, Chuck Wolber

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:

%< SNIP $<

>
> I suspect this causes some regressions in our automated testing
> unfortunately:
>
> buildtools:
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1396
>
> meta-mingw:
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/1430


Would it make more sense to add self.context_executor_class.default_cases
to the list of paths returned by get_sdk_paths?

..Ch:W..


-- 



*  Opinions expressed are my own. | --------------------------------|------
"Perfection must be reached by degrees              she requires the slow
hand of time."                                 |       -Voltaire*

[-- Attachment #2: Type: text/html, Size: 2116 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-17  4:39   ` Chuck Wolber
@ 2025-04-17 10:06     ` Gyorgy Sarvari
  2025-04-17 11:04     ` Richard Purdie
  1 sibling, 0 replies; 12+ messages in thread
From: Gyorgy Sarvari @ 2025-04-17 10:06 UTC (permalink / raw)
  To: chuckwolber, richard.purdie; +Cc: thune.a.tran, openembedded-core, Chuck Wolber

On 4/17/25 06:39, Chuck Wolber via lists.openembedded.org wrote:
> On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via
> lists.openembedded.org <http://lists.openembedded.org>
> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>
> %< SNIP $<
>
>
>     I suspect this causes some regressions in our automated testing
>     unfortunately:
>
>     buildtools:
>     https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1396
>
>     meta-mingw:
>     https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/1430
>
>
> Would it make more sense to add self.context_executor_class.default_cases
> to the list of paths returned by get_sdk_paths?
>
Well, the missing tests is one thing, but the other one is that the
errors are thrown by tests that were not meant to be executed (at least
when it comes to buildtools - haven't checked meta-mingw yet).

> ..Ch:W..
>
>  
> -- 
> *  Opinions expressed are my own. |
>  --------------------------------|------ "Perfection must be reached
> by degrees
>               she requires the slow hand of time."
>                                  |       -Voltaire*


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2025-04-17 11:04 UTC (permalink / raw)
  To: Chuck Wolber; +Cc: thune.a.tran, openembedded-core, Chuck Wolber

On Wed, 2025-04-16 at 21:39 -0700, Chuck Wolber wrote:
> On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via
> lists.openembedded.org
> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
> 
> %< SNIP $< 
> > 
> > I suspect this causes some regressions in our automated testing
> > unfortunately:
> > 
> > buildtools:
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1396
> > 
> > meta-mingw:
> > https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/1430
> > 
> 
> 
> Would it make more sense to add
> self.context_executor_class.default_cases
> to the list of paths returned by get_sdk_paths?

meta/recipes-core/meta/buildtools-tarball.bb does:

    cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), d.getVar("TESTSDK_CASES"))
    testsdk.context_executor_class.default_cases = cases_path

mingw does things in a different place, setting:

    default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]

in meta-mingw/lib/oeqa/sdkmingw/contex.py

I think we need to add something which represents the name of the
directory for cases, i.e. "sdk", "sdkming", "sdk/buildtools-cases" and
then allow this to be passed into your function so regardless, it
allows customisation within a layer.

Just adding default cases to anything in the layer is going to always
add the layer's test cases which isn't what we want (i.e. your layer
would add to buildtools, mingw and sdk).

Cheers,

Richard


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-17 11:04     ` Richard Purdie
@ 2025-04-17 12:54       ` Tran (US), Thune A
  2025-04-17 13:03         ` Richard Purdie
  0 siblings, 1 reply; 12+ messages in thread
From: Tran (US), Thune A @ 2025-04-17 12:54 UTC (permalink / raw)
  To: Richard Purdie, Chuck Wolber
  Cc: openembedded-core@lists.openembedded.org, Wolber (US), Chuck

> On Wed, 2025-04-16 at 21:39 -0700, Chuck Wolber wrote:
>> On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via
>> lists.openembedded.org
>> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>> 
>> %< SNIP $<
>>> 
>>> I suspect this causes some regressions in our automated testing
>>> unfortunately:
>>> 
>>> buildtools:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1
>>> 396
>>> 
>>> meta-mingw:
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/14
>>> 30
>>> 
>> 
>> 
>> Would it make more sense to add
>> self.context_executor_class.default_cases
>> to the list of paths returned by get_sdk_paths?
> 
> meta/recipes-core/meta/buildtools-tarball.bb does:
> 
>     cases_path =
> os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)),
> d.getVar("TESTSDK_CASES"))
>     testsdk.context_executor_class.default_cases = cases_path
> mingw does things in a different place, setting:
> 
>     default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
> 'cases')]
> 
> in meta-mingw/lib/oeqa/sdkmingw/contex.py
> 
> I think we need to add something which represents the name of the
> directory for cases, i.e. "sdk", "sdkming", "sdk/buildtools-cases" and
> then allow this to be passed into your function so regardless, it allows
> customisation within a layer.
We can match the test directory pattern (sdk, sdkming, sdk/buildtools-cases)  
found in default_cases. The test discovery will then be based on the matched pattern.
> 
> Just adding default cases to anything in the layer is going to always add the
> layer's test cases which isn't what we want (i.e. your layer would add to
> buildtools, mingw and sdk).
> 
> Cheers,
> 
> Richard



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  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>
  0 siblings, 2 replies; 12+ messages in thread
From: Richard Purdie @ 2025-04-17 13:03 UTC (permalink / raw)
  To: thune.a.tran, Chuck Wolber
  Cc: openembedded-core@lists.openembedded.org, Wolber (US), Chuck

On Thu, 2025-04-17 at 12:54 +0000, Thune Tran via lists.openembedded.org wrote:
> > On Wed, 2025-04-16 at 21:39 -0700, Chuck Wolber wrote:
> > > On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via
> > > lists.openembedded.org
> > > <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
> > > 
> > > %< SNIP $<
> > > > 
> > > > I suspect this causes some regressions in our automated testing
> > > > unfortunately:
> > > > 
> > > > buildtools:
> > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/builds/1
> > > > 396
> > > > 
> > > > meta-mingw:
> > > > https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/builds/14
> > > > 30
> > > > 
> > > 
> > > 
> > > Would it make more sense to add
> > > self.context_executor_class.default_cases
> > > to the list of paths returned by get_sdk_paths?
> > 
> > meta/recipes-core/meta/buildtools-tarball.bb does:
> > 
> >     cases_path =
> > os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)),
> > d.getVar("TESTSDK_CASES"))
> >     testsdk.context_executor_class.default_cases = cases_path
> > mingw does things in a different place, setting:
> > 
> >     default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)),
> > 'cases')]
> > 
> > in meta-mingw/lib/oeqa/sdkmingw/contex.py
> > 
> > I think we need to add something which represents the name of the
> > directory for cases, i.e. "sdk", "sdkming", "sdk/buildtools-cases" and
> > then allow this to be passed into your function so regardless, it allows
> > customisation within a layer.
> We can match the test directory pattern (sdk, sdkming, sdk/buildtools-cases)  
> found in default_cases. The test discovery will then be based on the matched pattern.
> 

We could do that but in this case I think it might be better to improve
the code and make it a bit cleaner if we can, even if that is a little
more invasive.

This area of the code could do with simplification/cleanup...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
  2025-04-17 13:03         ` Richard Purdie
@ 2025-04-17 15:53           ` Tran (US), Thune A
       [not found]           ` <18372610739395C0.11203@lists.openembedded.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Tran (US), Thune A @ 2025-04-17 15:53 UTC (permalink / raw)
  To: Richard Purdie, Chuck Wolber
  Cc: openembedded-core@lists.openembedded.org, Wolber (US), Chuck

> On Thu, 2025-04-17 at 12:54 +0000, Thune Tran via lists.openembedded.org
> wrote:
>>> On Wed, 2025-04-16 at 21:39 -0700, Chuck Wolber wrote:
>>>> On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via
>>>> lists.openembedded.org
>>>> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>>>> 
>>>> %< SNIP $<
>>>>> 
>>>>> I suspect this causes some regressions in our automated testing
>>>>> unfortunately:
>>>>> 
>>>>> buildtools:
>>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/buil
>>>>> ds/1
>>>>> 396
>>>>> 
>>>>> meta-mingw:
>>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/build
>>>>> s/14
>>>>> 30
>>>>> 
>>>> 
>>>> 
>>>> Would it make more sense to add
>>>> self.context_executor_class.default_cases
>>>> to the list of paths returned by get_sdk_paths?
>>> 
>>> meta/recipes-core/meta/buildtools-tarball.bb does:
>>> 
>>>     cases_path =
>>> os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file
>>> __)),
>>> d.getVar("TESTSDK_CASES"))
>>>     testsdk.context_executor_class.default_cases = cases_path mingw
>>> does things in a different place, setting:
>>> 
>>>     default_cases =
>>> [os.path.join(os.path.abspath(os.path.dirname(__file__)),
>>> 'cases')]
>>> 
>>> in meta-mingw/lib/oeqa/sdkmingw/contex.py
>>> 
>>> I think we need to add something which represents the name of the
>>> directory for cases, i.e. "sdk", "sdkming", "sdk/buildtools-cases"
>>> and then allow this to be passed into your function so regardless,
>>> it allows customisation within a layer.
>> We can match the test directory pattern (sdk, sdkming,
>> sdk/buildtools-cases) found in default_cases. The test discovery will
>> then be based on the matched pattern.
>> 
> 
> We could do that but in this case I think it might be better to improve
> the code and make it a bit cleaner if we can, even if that is a little
> more invasive.
> 
> This area of the code could do with simplification/cleanup...

Makes sense. We'll look into how the code can be improved as we continue 
to work in and become more familiar with this area of the code.
> Cheers,
> 
> Richard



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core] [PATCH] oeqa/sdk/sdktest: Add test discovery across layers
       [not found]           ` <18372610739395C0.11203@lists.openembedded.org>
@ 2025-04-21 19:21             ` Tran (US), Thune A
  0 siblings, 0 replies; 12+ messages in thread
From: Tran (US), Thune A @ 2025-04-21 19:21 UTC (permalink / raw)
  To: Richard Purdie, Chuck Wolber
  Cc: openembedded-core@lists.openembedded.org, Wolber (US), Chuck

>> On Thu, 2025-04-17 at 12:54 +0000, Thune Tran via 
>> lists.openembedded.org
>> wrote:
>>>> On Wed, 2025-04-16 at 21:39 -0700, Chuck Wolber wrote:
>>>>> On Wed, Apr 16, 2025 at 3:07 PM Richard Purdie via 
>>>>> lists.openembedded.org 
>>>>> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>>>>> 
>>>>> %< SNIP $<
>>>>>> 
>>>>>> I suspect this causes some regressions in our automated testing
>>>>>> unfortunately:
>>>>>> 
>>>>>> buildtools:
>>>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/43/buil
>>>>>> ds/1
>>>>>> 396
>>>>>> 
>>>>>> meta-mingw:
>>>>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/7/build
>>>>>> s/14
>>>>>> 30
>>>>>> 
>>>>> 
>>>>> 
>>>>> Would it make more sense to add
>>>>> self.context_executor_class.default_cases
>>>>> to the list of paths returned by get_sdk_paths?
>>>> 
>>>> meta/recipes-core/meta/buildtools-tarball.bb does:
>>>> 
>>>>     cases_path =
>>>> os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__fil
>>>> e
>>>> __)),
>>>> d.getVar("TESTSDK_CASES"))
>>>>     testsdk.context_executor_class.default_cases = cases_path mingw 
>>>> does things in a different place, setting:
>>>> 
>>>>     default_cases =
>>>> [os.path.join(os.path.abspath(os.path.dirname(__file__)),
>>>> 'cases')]
>>>> 
>>>> in meta-mingw/lib/oeqa/sdkmingw/contex.py
>>>> 
>>>> I think we need to add something which represents the name of the 
>>>> directory for cases, i.e. "sdk", "sdkming", "sdk/buildtools-cases"
>>>> and then allow this to be passed into your function so regardless, 
>>>> it allows customisation within a layer.
>>> We can match the test directory pattern (sdk, sdkming,
>>> sdk/buildtools-cases) found in default_cases. The test discovery 
>>> will then be based on the matched pattern.
>>> 
>> 
>> We could do that but in this case I think it might be better to 
>> improve the code and make it a bit cleaner if we can, even if that is 
>> a little more invasive.
>> 
>> This area of the code could do with simplification/cleanup...
> 
> Makes sense. We'll look into how the code can be improved as we 
> continue to work in and become more familiar with this area of the code.

Looked into it and found some places to improve on, so planning a  PATCHv2 oeqa/sdk to simplify the way tests are specified for the SDK configurations.
>> Cheers,
>> 
>> Richard
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-04-21 19:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 16:41 [PATCH] oeqa/sdk/sdktest: Add test discovery across layers Thune Tran
2025-04-16 17:23 ` [OE-core] " Gyorgy Sarvari
2025-04-16 20:54   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox