Bug 15248 - Consider migrating oe-selftest to pytest
Summary: Consider migrating oe-selftest to pytest
Status: NEW
Alias: None
Product: Functional (self) Testing
Classification: QA/Testing
Component: oe-selftest (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-10-20 04:07 UTC by Chris Laplante
Modified: 2025-10-30 15:17 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Laplante 2023-10-20 04:07:38 UTC
As a relative outsider looking in, it seems to me that oe-selftest has grown beyond the capabilities of unittest. I think we could benefit from some of the more sophisticated features of a framework like pytest.

Some highlights worth investigating:
* Fixtures: https://pytest.org/en/7.4.x/how-to/fixtures.html
* Live logging: https://pytest.org/en/7.4.x/how-to/logging.html#live-logs
* Parameterization: https://pytest.org/en/7.4.x/how-to/parametrize.html#basic-pytest-generate-tests-example

However, I don't know if it is realistically possible to make the migration in any reasonable amount of time...
Comment 1 Randy MacLeod 2023-10-26 14:35:17 UTC
Does pytest support concurrent execution?  There are several plugins apparently so we'd need to pick on.
Getting someone time to work on it is a challenge.
Comment 2 Tim Orling 2023-10-26 14:37:45 UTC
https://pypi.org/project/pytest-xdist/ is probably the best known of the concurrent execution plugins.