Files
HamPack/smoketest/lib.sh
T
David YoungandClaude Opus 5.5 e8fbe256df
check / lint-and-test (push) Successful in 1m37s
check / packages (push) Successful in 23s
Add a smoketest, run on CoreDesktop's with coredesktop-dev
`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>
2026-11-26 10:15:11 -07:00

23 lines
731 B
Bash

#!/bin/bash
#
# Purpose : Helpers for HamPack's smoketest scenarios, on top of CoreDesktop's
# smoketest/lib/scenario.sh. Scenarios source this.
# hampack_file FILE: print HamPack's FILE at the commit under test
hampack_file() {
git -C "$(project_dir HamPack)" show "$(project_sha HamPack):$1"
}
# The apps in compile.conf at the commit under test, one per line
compiled_apps() {
hampack_file compile.conf | sed -n 's/^\[\(.*\)\]$/\1/p'
}
# compiled_version APP: APP's version= in compile.conf at the commit under test
compiled_version() {
hampack_file compile.conf | awk -v app="[$1]" '
$0 == app { found = 1; next }
/^\[/ { found = 0 }
found && /^version=/ { sub(/^version=/, ""); print; exit }'
}