All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: yocto-patches@lists.yoctoproject.org
Subject: Re: [wic][PATCH v4 0/6] tests: standalone test-suite framework plus the first unit test
Date: Wed, 8 Jul 2026 23:50:12 -0400	[thread overview]
Message-ID: <ak8adD3nntUJyEMY@localhost.localdomain> (raw)
In-Reply-To: <20260706222904.664863-1-twoerner@gmail.com>

Patch series applied to wic, master branch.
Thanks Paul!

On Mon 2026-07-06 @ 06:28:58 PM, Trevor Woerner wrote:
> wic has no test mechanism of its own; it relies on the oe-selftest from
> oe-core, which needs a full bitbake build to exercise even pure-Python
> logic. This series starts a small standalone suite that runs from a
> plain checkout, framework first, then the first fix, and its test.
> 
>   - the suite skeleton (pyproject test extra, pytest config, layout,
>     a justfile command runner, and a README Testing section);
>   - a conftest that imports wic once up front (stopping the session with
>     a clear message if that fails) and prints a session banner;
>   - optional coverage and ruff linting, each exposed as just recipes;
>   - a one-line fix to wic.bb.utils (import errno) so mkdirhier's OSError
>     handler works, as its own commit;
>   - unit tests for mkdirhier() that pin its behaviour and catch that
>     bug.
> 
> The suite is green at every commit and the test tree is ruff-clean.
> 
> Changes in v4 (in response to review feedback, thanks to Paul Barker):
> 
> v4 restructures the v3 10-patch series into 6 patches. How the old
> patches map to the new ones:
> 
>   - v3 1/10 (skeleton) -> v4 1/6, which also gains a justfile command
>     runner in place of the run-tests.sh wrapper and no longer creates a
>     tests/docs/ tree;
>   - v3 2/10 (conftest banner) -> v4 2/6, which also absorbs the
>     wic-import check (see next line);
>   - v3 3/10 (run-tests.sh wrapper) -> dropped; the justfile replaces it
>     and its wic-import check moves into conftest, so the check runs on
>     every invocation rather than only through the wrapper;
>   - v3 4/10 (coverage) -> v4 3/6, exposed as just recipes;
>   - v3 5/10 (ruff linting) -> v4 4/6, exposed as just recipes, with
>     ruff now pinned exactly so the clean-bar gate is reproducible;
>   - v3 8/10 (tests/** E402 ignore) -> folded into v4 4/6;
>   - v3 6/10, 7/10, 10/10 (docs README, authoring guide, review rubric)
>     -> dropped; the suite ships a short README Testing section instead
>     of a tests/docs/ tree;
>   - v3 9/10 (test plus folded-in errno fix) -> split into v4 5/6 (the
>     errno fix, on its own, first) and v4 6/6 (the tests), and the tests
>     are reframed to target mkdirhier's own behaviour rather than
>     re-testing os.makedirs.
> 
> Dependency versions were also refreshed to current releases.
> 
> Changes in v3:
> 
>   - test_bb_utils used the tmp_path fixture instead of
>     tempfile.mkdtemp(), so the tests no longer leaked scratch
>     directories under /tmp;
>   - documented the standard pytest scratch-directory controls (TMPDIR
>     and --basetemp) rather than a custom variable;
>   - added a review-rubric doc.
> 
> Changes in v2:
> 
>   - v1 was a single ~6000-line commit that used xfail markers to record
>     the bugs it found; v2 broke the work into a reviewable series where
>     each test lands green next to the fix that makes it pass, with no
>     xfails.
> 
> Trevor Woerner (6):
>   tests: add the standalone unit-test suite skeleton
>   tests: add conftest with a wic-import preflight and session banner
>   tests: add optional coverage reporting
>   add ruff linting
>   bb/utils: import errno so mkdirhier's OSError handler works
>   tests/unit/test_bb_utils: cover mkdirhier()
> 
>  .gitignore                  |  4 ++
>  README.md                   | 15 +++++++
>  justfile                    | 27 +++++++++++++
>  pyproject.toml              | 24 +++++++++++
>  src/wic/bb/utils.py         |  1 +
>  tests/conftest.py           | 28 +++++++++++++
>  tests/unit/test_bb_utils.py | 81 +++++++++++++++++++++++++++++++++++++
>  7 files changed, 180 insertions(+)
>  create mode 100644 justfile
>  create mode 100644 tests/conftest.py
>  create mode 100644 tests/unit/test_bb_utils.py
> 
> -- 
> 2.50.0.173.g8b6f19ccfc3a


      parent reply	other threads:[~2026-07-09  3:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 22:28 [wic][PATCH v4 0/6] tests: standalone test-suite framework plus the first unit test Trevor Woerner
2026-07-06 22:28 ` [wic][PATCH v4 1/6] tests: add the standalone unit-test suite skeleton Trevor Woerner
2026-07-06 22:29 ` [wic][PATCH v4 2/6] tests: add conftest with a wic-import preflight and session banner Trevor Woerner
2026-07-06 22:29 ` [wic][PATCH v4 3/6] tests: add optional coverage reporting Trevor Woerner
2026-07-06 22:29 ` [wic][PATCH v4 4/6] add ruff linting Trevor Woerner
2026-07-06 22:29 ` [wic][PATCH v4 5/6] bb/utils: import errno so mkdirhier's OSError handler works Trevor Woerner
2026-07-06 22:29 ` [wic][PATCH v4 6/6] tests/unit/test_bb_utils: cover mkdirhier() Trevor Woerner
2026-07-08 14:27 ` [yocto-patches] [wic][PATCH v4 0/6] tests: standalone test-suite framework plus the first unit test Paul Barker
2026-07-09  3:50 ` Trevor Woerner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ak8adD3nntUJyEMY@localhost.localdomain \
    --to=twoerner@gmail.com \
    --cc=yocto-patches@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.