Smoketest sibling projects on top of CoreDesktop

The scenario helpers now take a chain of projects from the driver
(SMOKETEST_CHAIN_FILE): CoreDesktop, then sibling projects such as HamPack.
Each gets a fake upstream in the VM; upstream_set and upstream_commit take
an optional project name; smoketest_prepare updates every project in the
installed image; and the new smoketest_build_layer, sibling_add and
install_chain install them. health also runs each installed sibling's
smoketest/health, and a sibling's smoketest/setup runs before each scenario.

Without a chain file, everything works as before, so older drivers and
CoreDesktop's own scenarios are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 10:15:10 -07:00
co-authored by Claude Opus 5.5
parent 4fb35397ee
commit 4f1e18200c
3 changed files with 439 additions and 52 deletions
+40 -3
View File
@@ -79,9 +79,13 @@ Helpers, from `lib/scenario.sh`:
| `cd_install` | Run install.sh as `wget ... \| bash` would, from the fake upstream's main |
| `cd_update [VAR=value...]` | Run `update` |
| `run_in_vm NAME SCRIPT` | Run SCRIPT in the VM; sets `$OUTPUT` and `$STATUS`, logs to NAME.log |
| `upstream_set REF` | Point the fake upstream's main at REF, a commit in this repo |
| `upstream_commit MESSAGE SCRIPT` | Run SCRIPT in a clone of the upstream (in the VM), commit, push |
| `fingerprint FILE` / `health` | Save the fingerprint / run the health checks |
| `upstream_set [PROJECT] REF` | Point the fake upstream's main at REF, a commit in the project's working copy (default: CoreDesktop) |
| `upstream_commit [PROJECT] MESSAGE SCRIPT` | Run SCRIPT in a clone of the project's upstream (in the VM), commit, push |
| `sibling_add PROJECT` | Run `sibling add` with the sibling project's URL |
| `install_chain` | Install CoreDesktop and every sibling in the run, rebooting as the READMEs say |
| `fingerprint FILE` | Save the fingerprint |
| `health [PROJECT...]` | Run the health checks: by default CoreDesktop's, and those of each sibling in the run that's installed |
| `in_run PROJECT` | True if the sibling project is in this run |
| `assert_status N`, `assert_output TEXT`, `refute_output TEXT` | Check the last `run_in_vm` |
| `assert_vm DESCRIPTION SCRIPT` | SCRIPT must succeed in the VM |
| `assert_same_fingerprint EXPECTED ACTUAL` | The two must match; saves the diff |
@@ -101,9 +105,42 @@ Helpers, from `lib/scenario.sh`:
| `SMOKETEST_RESULTS` | This scenario's folder for logs and fingerprints |
| `SMOKETEST_SHARED` | A folder shared by all scenarios in the run |
| `IMAGE_REF` | For the installed image, the commit it was installed at |
| `SMOKETEST_CHAIN_FILE` | Optional: the projects in the run (below). Without it, the run is CoreDesktop alone, at `SMOKETEST_REF`, in an image at `IMAGE_REF` |
To build the installed image, the driver calls `smoketest_build_layer CoreDesktop
SHA` on the base image instead of `smoketest_prepare`; and for a sibling's
image layer, `smoketest_build_layer NAME SHA` on the image below it.
Anything that boots a VM can drive these scenarios, e.g. a CI runner with KVM.
## Sibling projects
A sibling project (HamPack, say) can have scenarios of its own, run on top of
CoreDesktop's: `coredesktop-dev smoketest run --with HamPack`. Its working copy,
beside CoreDesktop's, has a `smoketest/project.conf`:
```
NAME=HamPack
PARENT=CoreDesktop # or a sibling it's built on
URLS=(https://gitea.young.computer/david/HamPack.git)
```
and its scenarios in `smoketest/scenarios/`, written like CoreDesktop's with
these helpers. Optionally, it has `smoketest/health`, run by `health`, and
`smoketest/setup`, run in the VM before every scenario and image build of a
run it's in, for what it needs on any machine it's tested on.
The run includes CoreDesktop's scenarios too, so it also checks the sibling
doesn't break CoreDesktop. Each sibling gets a fake upstream in the VM like
CoreDesktop's, and the installed image is layered: `installed+HamPack` is
installed after `sibling add HamPack`. Scenarios on it start by updating every
project to its commit under test.
The driver describes the run in `SMOKETEST_CHAIN_FILE`, one line per project,
CoreDesktop first, tab-separated: name, working copy, commit under test, commit
in the image (empty if none), and its URLs, separated by spaces (none for
CoreDesktop, whose are `COREDESKTOP_URLS`).
## Not covered
NVIDIA drivers, firmware updates (`updates.d/90-firmware.sh`), and anything that