Skip to content

patchtest: cleanups and fixes, part 1

Trevor Gamblin openembedded-core 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v16 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7scripts/patchtest: refactor results methodsscripts/patchtest+24 -320 replies
2/7scripts/patchtest: clean up startTestRun()scripts/patchtest+9 -120 replies
3/7scripts/patchtest: simplify _runner()scripts/patchtest+3 -60 replies
4/7scripts/patchtest: simplify traceback logging, remove whitespacescripts/patchtest+6 -90 replies
5/7scripts/patchtest: simplify run()scripts/patchtest+2 -70 replies
6/7scripts/patchtest: clean up main()scripts/patchtest+10 -160 replies
7/7scripts/patchtest: check for meta-selftestscripts/patchtest+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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(-)
Signature · 1 line
2.54.0