`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>
27 lines
959 B
Bash
27 lines
959 B
Bash
#!/bin/bash
|
|
# shellcheck disable=SC2034
|
|
DESCRIPTION="a build that fails is reported, keeps the installed app, and is retried on the next update"
|
|
IMAGE=installed
|
|
TIER="pr"
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/../lib.sh"
|
|
|
|
scenario() {
|
|
local old
|
|
old="$(compiled_version Dump1090)"
|
|
upstream_commit HamPack "Break Dump1090's build" \
|
|
'sed -i "/^\[Dump1090\]/,/^\$/ { s/^version=.*/&-smoketest/; s/^steps=/steps=false, /; }" compile.conf'
|
|
cd_update
|
|
assert_status 1
|
|
assert_output "Error: build of Dump1090 failed"
|
|
assert_output "HamPack's update.sh failed"
|
|
assert_vm "Dump1090 is still installed, at its old version" \
|
|
"test -x ~/.local/bin/dump1090 && grep -qx Dump1090=$(q "$old") ~/.local/state/HamPack/.installed_versions"
|
|
|
|
upstream_commit HamPack "Fix Dump1090's build" 'sed -i "s/^steps=false, /steps=/" compile.conf'
|
|
cd_update
|
|
assert_status 0
|
|
assert_output "Updating Dump1090 from $old to $old-smoketest"
|
|
health HamPack
|
|
}
|