Writing custom hardware tests
Rusty Howell <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <CAE+BM3mF4Gn8YdwbN_kYZYBngMBc36fpFhGZzUFYCgc2eSHrkQ@mail.gmail.com> |
Hi all,
I am trying to write some automated hardware tests for my device. I'm
following the instructions in
https://docs.yoctoproject.org/5.0.12/test-manual/runtime-testing.html#performing-automated-runtime-testing
In local.conf I have the following:
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES += "ptest-pkgs"
TEST_SERIALCONTROL_CMD = "microcom -s 115200 -p /dev/ttyUSB0"
IMAGE_CLASSES += "testimage"
#INHERIT += "testexport"
TEST_TARGET = "MyTarget"
In my layer I have a custom target
meta-my-layer/lib/oeqa/controllers/mytarget.py (copied from
meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py and modified for MyTarget
class)
When I run bitbake -c testimage my-image I get this error
0182: @staticmethod
0183: def _loadControllerFromModule(target, modulename):
Exception: AttributeError: Unable to load MyTarget from available modules:
['oeqa.controllers.controllerimage', 'oeqa.controllers.testtargetloader',
'oeqa.controllers.fvp']
If I add addpylib ${LAYERDIR}/lib oeqa to my layer.conf (like other layers
have) I get this new error
File:
'/workspaces/my-distro/sources/poky/meta/classes-recipe/testimage.bbclass',
lineno: 181, function: testimage_main
0177: import logging
0178: import shutil
0179:
0180: from bb.utils import export_proxies
*** 0181: from oeqa.runtime.context import OERuntimeTestContext
0182: from oeqa.runtime.context import OERuntimeTestContextExecutor
0183: from oeqa.core.target.qemu import supported_fstypes
0184: from oeqa.core.utils.test import getSuiteCases
0185: from oeqa.utils import make_logger_bitbake_compatible
Exception: ModuleNotFoundError: No module named 'oeqa.runtime.context'
Any help is appreciated.
Rusty Howell