mbox series

[0/7,v2] patchtest: cleanups and fixes, part 1

Message ID 20260618203632.131125-1-tgamblin@baylibre.com
Headers show
Series patchtest: cleanups and fixes, part 1 | expand

Message

Trevor Gamblin June 18, 2026, 8:36 p.m. UTC
This is the first split of patches coming from a previous series[1] I submitted.
Compared to that version, the changes here are refactors limited to the core
scripts/patchtest script itself, and do the following:

- Make sure that the user has enabled the meta-selftest layer before running
  patchtest, as otherwise selftest results can be misleading
- Avoid duplicating code for test results generation
- Remove excess whitespace, unused variables, redundant function calls, and
  unreachable code

Note that this was driven partially by Claude Code (Sonnet 4.6 and 4.7), but
I've gone back and reworked some of its changes before submission.

Selftests look OK after these changes:

|============================================================================
|Testsuite summary for patchtest
|============================================================================
|# TOTAL: 38
|# XPASS: 18
|# XFAIL: 18
|# XSKIP: 2
|# PASS: 0
|# FAIL: 0
|# SKIP: 0
|# ERROR: 0
|============================================================================

[1]: https://lists.openembedded.org/g/openembedded-core/message/237047

Trevor Gamblin (7):
  scripts/patchtest: refactor results methods
  scripts/patchtest: clean up startTestRun()
  scripts/patchtest: simplify _runner()
  scripts/patchtest: simplify traceback logging, remove whitespace
  scripts/patchtest: simplify run()
  scripts/patchtest: clean up main()
  scripts/patchtest: check for meta-selftest

 scripts/patchtest | 147 ++++++++++++++++++++--------------------------
 1 file changed, 65 insertions(+), 82 deletions(-)