Re: [yocto 3.1] adding custom testsdk script in own layer


Chen Qi
 

Hi Karthik,

Looking at the codes briefly, I would say the reason is that testimage considers all BBLAYERS while testsdk does not.

The key codes for testimage are:
testimage.bbclass:get_runtime_paths:
for layer in d.getVar('BBLAYERS').split():
        path = os.path.join(layer, 'lib/oeqa/runtime/cases')
        if os.path.isdir(path):
            paths.append(path)
    return paths

The key codes for testsdk are:
meta/lib/oeqa/sdk/context.py:OESDKTestContextExecutor:
default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]

I think you can fix the codes in sdk/context.py to make it consider BBLAYERS just as testimage.bbclass does.

P.S.
I'm not 100% sure, as I did not do any tests.

Regards,
Qi


On 4/2/22 09:44, Karthik Poduval wrote:
Ping. Still need help on this one, experts kindly advise.

On Tue, Mar 29, 2022, 4:34 PM Karthik Poduval <karthik.poduval@...> wrote:
Hi All,

We were trying to add a custom sdktest script as shown in example https://docs.yoctoproject.org/test-manual/intro.html#testsdk.

The script gets invoked when placed in meta/lib/oeqa/sdk/cases/mysdktest.py

However when placed under.
<my layer>/lib/oeqa/sdk/cases/mysdktest.py
It does not get invoked when running 
bitbake <my image> -c testsdk

The testimage scripts do work when placed under 
<my layer>/lib/oeqa/runtime/cases/ 
as they are controlled by the TEST_SUITES variable.

Kindly advise on how to proceed.

--
Regards,
Karthik Poduval





Join yocto@lists.yoctoproject.org to automatically receive all group messages.