Add a smoketest, run on CoreDesktop's with coredesktop-dev
check / lint-and-test (push) Successful in 1m37s
check / packages (push) Successful in 23s

`coredesktop-dev smoketest run --with HamPack` installs HamPack on a VM with
CoreDesktop and checks a fresh install, an update with nothing to do, a
one-app rebuild, a failing build and hampackremove, with smoketest/health
checking every package, Flatpak and app is in place.

HAMPACK_SKIP_WINDOWS_APPS skips the Windows installers, which the test VMs'
desktop would start with no one to click through them; smoketest/setup sets
it in each VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-26 10:15:11 -07:00
co-authored by Claude Opus 5.5
parent bc536407c4
commit e8fbe256df
16 changed files with 417 additions and 2 deletions
+41
View File
@@ -0,0 +1,41 @@
# HamPack's smoketest
End-to-end tests of HamPack on a real Arch + GNOME virtual machine with
CoreDesktop installed: `sibling add`, `update` and `hampackremove`, with real
pacman, AUR, Flatpak and source builds. The bats tests in `tests/` check the
logic with fake commands; these check what fakes can't.
They run with CoreDesktop's smoketest, from the `coredesktop-dev` sibling
project, with HamPack's working copy beside CoreDesktop's (in `~/Projects`):
```
coredesktop-dev smoketest list --with HamPack
coredesktop-dev smoketest run --with HamPack # the quick (pr) scenarios, CoreDesktop's too
coredesktop-dev smoketest run --with HamPack HamPack/30 # just this one
coredesktop-dev smoketest run --with HamPack --tier all # everything, including fresh installs
```
Each working copy's `HEAD` is tested, so commit first. The first run builds
the `installed+HamPack` image, CoreDesktop's installed image after `sibling add
HamPack` at the commit this branch started from. That takes an hour or two,
building the source apps; later runs reuse it. See coredesktop-dev's README for
what the smoketest needs and how its images work.
## Files
| File | What it is |
|------|------------|
| `project.conf` | HamPack's name, parent (CoreDesktop) and URL, for the driver |
| `setup` | Runs in each VM first: sets `HAMPACK_SKIP_WINDOWS_APPS`, since no one is there to click through the Windows installers |
| `health` | Runs in the VM; checks every package, Flatpak and app HamPack installs, at its version, with its libraries and desktop file |
| `lib.sh` | Helpers for the scenarios, on top of CoreDesktop's `smoketest/lib/scenario.sh` |
| `scenarios/NN-name.sh` | One scenario each |
Scenarios are written like CoreDesktop's (see its `smoketest/README.md`), with
HamPack named where it matters: `upstream_commit HamPack MESSAGE SCRIPT`
releases a new HamPack commit, and `health HamPack` checks HamPack alone.
## Not covered
The Windows applications (VARA, Winlink Express), anything that needs a radio,
and whether the apps work beyond starting: check those by hand.