From: Trevor Woerner <twoerner@gmail.com>
To: yocto-patches@lists.yoctoproject.org
Subject: [wic][PATCH v2 6/9] tests/docs: add the suite overview README
Date: Tue, 30 Jun 2026 12:06:09 -0400 [thread overview]
Message-ID: <20260630160612.1005451-7-twoerner@gmail.com> (raw)
In-Reply-To: <20260630160612.1005451-1-twoerner@gmail.com>
The test suite needs a front door: a short document that says what the
suite is, how it is laid out, and how to run it. This commit adds
tests/docs/README.md to be that overview.
The README covers:
- the layout of tests/, file by file;
- that the suite is unit-only and needs no host tools or build
environment, so it runs from a plain checkout;
- how to install the test extras and invoke run-tests.sh, pointing at
run-tests.sh --help as the authoritative, always-current list of
options rather than duplicating them here where they would drift;
- that anything run-tests.sh does not recognise is passed through to
pytest;
- a pointer to linting.md for how ruff is applied;
- a small table of the other documents under tests/docs/.
It deliberately does not enumerate every run-tests.sh option, since the
runner is expected to grow more of them; the table and the --help
output stay the source of truth.
AI-Generated: codex/claude-opus 4.7 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v2:
- v1 submitted the entire test suite as a single commit; v2 breaks
the work into a reviewable series, and this patch is one step of it.
---
tests/docs/README.md | 61 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 tests/docs/README.md
diff --git a/tests/docs/README.md b/tests/docs/README.md
new file mode 100644
index 000000000000..7f59c9efb84d
--- /dev/null
+++ b/tests/docs/README.md
@@ -0,0 +1,61 @@
+# wic test suite
+
+A standalone test suite for the wic source tree. It runs from a plain
+checkout with nothing but `pytest` -- no bitbake, no OpenEmbedded
+build, and no target image -- so wic's logic can be exercised and kept
+stable as the code changes.
+
+## Contents
+
+- [Layout](#layout)
+- [Running](#running)
+- [Linting](#linting)
+- [Documentation](#documentation)
+
+## Layout
+
+```
+tests/
+ conftest.py session banner describing the run
+ run-tests.sh wrapper for running the suite
+ unit/ unit tests that import wic modules directly
+ docs/ this documentation
+```
+
+The suite is unit-only: every test under `tests/unit/` imports a wic
+module in-process and asserts on its behaviour, so none of it needs
+host tools or a build environment.
+
+## Running
+
+Install wic with its test extras, then run the suite:
+
+```bash
+pip install -e ".[tests]"
+tests/run-tests.sh
+```
+
+`run-tests.sh` works from anywhere in the checkout. It can also report
+branch coverage of the wic source; run `tests/run-tests.sh --help` for
+the current list of options.
+
+Anything `run-tests.sh` does not recognise is handed straight to
+pytest, so the whole pytest command line is available:
+
+```bash
+tests/run-tests.sh -k filemap -v # one area, verbose
+tests/run-tests.sh tests/unit # a single tier or file
+```
+
+## Linting
+
+The test suite is linted with ruff and is held to a clean bar. See
+[linting.md](linting.md) for the lint modes and how the source tree is
+treated.
+
+## Documentation
+
+| File | Content |
+|------|---------|
+| [authoring.md](authoring.md) | How to add a unit test to the suite |
+| [linting.md](linting.md) | How ruff is used on the suite |
--
2.50.0.173.g8b6f19ccfc3a
next prev parent reply other threads:[~2026-06-30 16:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 16:06 [wic][PATCH v2 0/9] tests: standalone test-suite framework plus the first unit test Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 1/9] tests: add the standalone test-suite skeleton Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 2/9] tests: add a session banner via conftest.py Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 3/9] tests: add the run-tests.sh wrapper Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 4/9] tests: add optional coverage reporting to run-tests.sh Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 5/9] tests: add ruff linting " Trevor Woerner
2026-06-30 16:06 ` Trevor Woerner [this message]
2026-06-30 16:06 ` [wic][PATCH v2 7/9] tests/docs: add the test-authoring guide Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 8/9] tests: ignore E402 in the test tree for the sys.path bootstrap Trevor Woerner
2026-06-30 16:06 ` [wic][PATCH v2 9/9] tests/unit/test_bb_utils: test mkdirhier() and fix its missing errno import Trevor Woerner
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=20260630160612.1005451-7-twoerner@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox