[wic][PATCH v3 00/10] tests: standalone test-suite framework plus the first unit test
Trevor Woerner <[email protected]> Wed, 1 Jul 2026 03:40:20 -0400
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
v1 sent the whole test suite as a single 6000-line commit that leaned on
xfail markers to record the bugs it found. Review feedback was that this
is not reviewable: the request was for a series of small commits where
each test lands green next to the source fix that makes it pass, with no
xfails and no failing tests at any commit boundary.
This series is that rework. Rather than resend the entire suite at once,
it establishes the test framework and a single representative test so the
structure and conventions can be reviewed first. Later functions will
follow as their own per-function commits once this base is agreed.
The series contains:
- the suite skeleton (pyproject test config, layout, .gitignore,
README Testing section);
- the conftest session banner;
- the run-tests.sh wrapper, with optional coverage and ruff linting
added in their own commits;
- the suite docs (overview README, authoring guide, and review rubric)
and the one ruff per-file-ignore the sys.path bootstrap needs;
- the first unit test, tests/unit/test_bb_utils, which tests
mkdirhier() and carries the one-line errno-import fix the test
exposes, so the suite is green.
The whole suite is green at every commit (zero failures, zero xfails)
and tests/run-tests.sh --lint-tests is clean throughout.
Changes in v3:
- tests/unit/test_bb_utils now uses pytest's tmp_path fixture instead
of tempfile.mkdtemp(), so the tests no longer leak scratch
directories under /tmp.
- the suite README documents the standard pytest scratch-directory
controls (TMPDIR and --basetemp), so no custom temporary-directory
variable is needed.
- a new commit adds tests/docs/reviewing.md, the rubric a test change
is reviewed against, linked from the suite README.
Trevor Woerner (10):
tests: add the standalone test-suite skeleton
tests: add a session banner via conftest.py
tests: add the run-tests.sh wrapper
tests: add optional coverage reporting to run-tests.sh
tests: add ruff linting to run-tests.sh
tests/docs: add the suite overview README
tests/docs: add the test-authoring guide
tests: ignore E402 in the test tree for the sys.path bootstrap
tests/unit/test_bb_utils: test mkdirhier() and fix its missing errno
import
tests/docs: add the review rubric
.gitignore | 10 +++
README.md | 15 ++++
pyproject.toml | 30 +++++++
src/wic/bb/utils.py | 1 +
tests/conftest.py | 38 +++++++++
tests/docs/README.md | 83 ++++++++++++++++++
tests/docs/authoring.md | 124 +++++++++++++++++++++++++++
tests/docs/linting.md | 59 +++++++++++++
tests/docs/reviewing.md | 164 ++++++++++++++++++++++++++++++++++++
tests/run-tests.sh | 159 ++++++++++++++++++++++++++++++++++
tests/unit/.gitkeep | 0
tests/unit/test_bb_utils.py | 116 +++++++++++++++++++++++++
12 files changed, 799 insertions(+)
create mode 100644 tests/conftest.py
create mode 100644 tests/docs/README.md
create mode 100644 tests/docs/authoring.md
create mode 100644 tests/docs/linting.md
create mode 100644 tests/docs/reviewing.md
create mode 100755 tests/run-tests.sh
create mode 100644 tests/unit/.gitkeep
create mode 100644 tests/unit/test_bb_utils.py
--
2.50.0.173.g8b6f19ccfc3a