Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72AC9C369B2 for ; Mon, 14 Apr 2025 11:05:32 +0000 (UTC) Subject: sdktest.bbclass does not find custom sdk tests To: yocto@lists.yoctoproject.org From: kasper.sloth99@gmail.com X-Originating-Location: Hvidovre, Capital Region, DK (87.62.83.1) X-Originating-Platform: Linux Firefox 137 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 10 Apr 2025 23:52:19 -0700 Message-ID: Content-Type: multipart/alternative; boundary="J6mK0nRpcVwRvgCBoMjm" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Apr 2025 11:05:32 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/65158 --J6mK0nRpcVwRvgCBoMjm Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I'm currently trying to create some tests for my sdk, using sdktest.bbclass= , but i'm having issues with bitbake locating my tests. In my layer, i have this setup: =E2=94=9C=E2=94=80=E2=94=80 meta-custom ... =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 conf =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 layer.conf =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 lib =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 oeqa =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80= controllers =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2=A0 =E2=94=94= =E2=94=80=E2=94=80 __init__.py =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80=E2=94=80= sdk =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2= =94=80=E2=94=80 cases =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=82 =C2= =A0 =E2=94=9C=E2=94=80=E2=94=80 mytest.py =E2=94=82 =C2=A0 =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2= =94=80=E2=94=80 __init__.py ... In the __init__.py files i have added: from pkgutil import extend_path __path__ =3D extend_path ( __path__ , __name__ ) And in layer.conf: addpylib ${ LAYERDIR } / lib oeqa And in my image i have: inherit testsdk mytest.py is quite simple: from oeqa. sdk. case import OESDKTestCase class CustomTestSuite ( OESDKTestCase ): def test_failure ( self ): self. _run ( " false " ) def test_success ( self ): self. _run ( " true " ) But when i run bitbake custom-image -c testsdk after bitbake custom-image -= c populate_sdk, the following is only run: SDK testing environment: armv8a-poky-linux GalculatorTest class: SDK don't = support gtk+3 No python3-maturin package in the SDK No python3-maturin pack= age in the SDK RustCompileTest class: SDK doesn't contain a Rust cross-cana= dian toolchain RustCompileTest class: SDK doesn't contain a Rust cross-cana= dian toolchain RESULTS: RESULTS - assimp.BuildAssimp.test_assimp: PASSED (8= 9.13s) RESULTS - buildcpio.BuildCpioTest.test_cpio: PASSED (23.24s) RESULTS= - buildepoxy.EpoxyTest.test_epoxy: PASSED (11.51s) RESULTS - buildlzip.Bui= ldLzipTest.test_lzip: PASSED (1.31s) RESULTS - gcc.GccCompileTest.test_gcc_= compile: PASSED (0.07s) RESULTS - gcc.GccCompileTest.test_gpp2_compile: PAS= SED (0.07s) RESULTS - gcc.GccCompileTest.test_gpp_compile: PASSED (0.17s) R= ESULTS - gcc.GccCompileTest.test_make: PASSED (0.08s) RESULTS - perl.PerlTe= st.test_perl: PASSED (0.02s) RESULTS - python.Python3Test.test_python3: PAS= SED (0.03s) RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPP= ED (0.00s) RESULTS - maturin.MaturinDevelopTest.test_maturin_develop: SKIPP= ED (0.00s) RESULTS - maturin.MaturinTest.test_maturin_list_python: SKIPPED = (0.00s) RESULTS - rust.RustCompileTest.test_cargo_build: SKIPPED (0.00s) RE= SULTS - rust.RustHostCompileTest.test_cargo_build: SKIPPED (0.00s) SUMMARY: custom-image sdk - Ran 15 tests in 125.628s custom-image sdk - OK = - All required tests passed (successes=3D10, skipped=3D5, failures=3D0, err= ors=3D0) NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to b= e rerun and all succeeded. Where i would expect: mytest.CustomTestSuite.test_failure: FAILURE (or ERROR) mytest.CustomTestSuite.test_success: PASSED Any help or pointers is appreciated :) --J6mK0nRpcVwRvgCBoMjm Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi,
I'm currently trying to create some tests for my sdk, using sdktest.bb= class, but i'm having issues with bitbake locating my tests.
In my layer, i have this setup:
=E2=94=9C=E2=94=80=E2=94=80 meta-custom
...
=E2=94=82  = =E2=94=9C=E2=94=80=E2=94=80 conf
=E2=94=82   =E2=94=82   = =E2=94=94=E2=94=80=E2=94=80 layer.conf
=E2=94=82   =E2=94=9C=E2= =94=80=E2=94=80 lib
=E2=94=82   =E2=94=82   =E2=94=94=E2=94= =80=E2=94=80 oeqa
=E2=94=82   =E2=94=82       =E2= =94=9C=E2=94=80=E2=94=80 controllers
=E2=94=82   =E2=94=82  =     =E2=94=82   =E2=94=94=E2=94=80=E2=94=80 __init__.py
=E2=94=82   =E2=94=82       =E2=94=94=E2=94=80=E2=94= =80 sdk
=E2=94=82   =E2=94=82           = =E2=94=9C=E2=94=80=E2=94=80 cases
=E2=94=82   =E2=94=82   &n= bsp;       =E2=94=82   =E2=94=9C=E2=94=80=E2=94=80 myte= st.py
=E2=94=82   =E2=94=82           = =E2=94=9C=E2=94=80=E2=94=80 __init__.py
...

In the __init__= .py files i have added:
from pkgutil import extend_path
__path__ =3D extend_path<= span style=3D"color: #b4b4b4;">(__pa= th__, __name__)
 
And in layer.conf:
 
addpylib ${LAYERDIR}/lib o= eqa
 
And in my image i have:
inherit testsdk
 
mytest.py is quite simple:
from oeqa.sdk.case import= OESDKTestCase

class CustomTestSuite(OESDKTestC= ase):
test_failure(self):
._run("false")=

test_success(self):
._run("true")<= /div>
 
But when i run bitbake custom-image -c testsdk after bitbake custom-im= age -c populate_sdk, the following is only run:
SDK testing environment:= armv8a-poky-linux GalculatorTest class: SDK don't support gtk+3 No python3-maturin package in the SDK No python3-maturin package in the SDK RustCompileTest class: SDK doesn't contain a Rust cross-can= adian toolchain RustCompileTest class: SDK doesn't contain a Rust cross-can= adian toolchain RESULTS: RESULTS - assimp.BuildAssimp.test_assimp: PASSED (89.13s) RESULTS - buildcpio.BuildCpioTest.test_cpio: PASSED (23.24s= ) RESULTS - buildepoxy.EpoxyTest.test_epoxy: PASSED (11.51s) RESULTS - buildlzip.BuildLzipTest.test_lzip: PASSED (1.31s) RESULTS - gcc.GccCompileTest.test_gcc_compile: PASSED (0.07= s) RESULTS - gcc.GccCompileTest.test_gpp2_compile: PASSED (0.0= 7s) RESULTS - gcc.GccCompileTest.test_gpp_compile: PASSED (0.17= s) RESULTS - gcc.GccCompileTest.test_make: PASSED (0.08s) RESULTS - perl.PerlTest.test_perl: PASSED (0.02s) RESULTS - python.Python3Test.test_python3: PASSED (0.03s) RESULTS - buildgalculator.GalculatorTest.test_galculator: S= KIPPED (0.00s) RESULTS - maturin.MaturinDevelopTest.test_maturin_develop: = SKIPPED (0.00s) RESULTS - maturin.MaturinTest.test_maturin_list_python: SKI= PPED (0.00s) RESULTS - rust.RustCompileTest.test_cargo_build: SKIPPED (0= .00s) RESULTS - rust.RustHostCompileTest.test_cargo_build: SKIPPE= D (0.00s)
SUMMARY: custom-image sdk - Ran 15 tests in 125.628s custom-image sdk - OK - All required tests passed (successe= s=3D10, skipped=3D5, failures=3D0, errors=3D0) NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't ne= ed to be rerun and all succeeded.
 
Where i would expect:
mytest.CustomTestSuite.test_failure: FAILURE (or ERROR)
mytest.CustomTestSuite.test_success: PASSED
 
Any help or pointers is appreciated :)
--J6mK0nRpcVwRvgCBoMjm--