Files
coredesktop/smoketest/scenarios/30-upgrade-from-baseline.sh
T
davidandClaude Opus 5.5 0950625536 smoketest: install the baselines with herdr-bin for herdr
Every baseline installs herdr from source, which pins zig 0.16, and Arch
now has 0.17, so their installs fail. Install them with herdr-bin (which
provides herdr, and is what HEAD installs) in a commit on top, then put
the clone back at the baseline itself, since update pulls --ff-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 10:49:35 -07:00

40 lines
1.4 KiB
Bash

#!/bin/bash
# shellcheck disable=SC2034
DESCRIPTION="install an older commit, update to the commit under test: same machine as a fresh install"
IMAGE=base
TIER="nightly"
mapfile -t VARIANTS < <(sed 's/#.*//' "$(dirname "${BASH_SOURCE[0]}")/../baselines" | awk 'NF { print $1 }')
scenario() {
[ -f "$(reference_fingerprint)" ] \
|| skip "needs the fingerprint 10-fresh-install saves; run both in the same run"
local sha
sha="$(git -C "$SMOKETEST_REPO" rev-parse "$VARIANT^{commit}")"
upstream_set "$sha"
# Older installers ask for packages that no longer build. Install those
# baselines with a fix on top, then put the clone back at the baseline
# itself, as on a machine installed back then: update pulls --ff-only.
# The source-built herdr pins a zig version Arch has moved on from;
# herdr-bin provides herdr, and is what HEAD installs instead
if git -C "$SMOKETEST_REPO" show "$sha:packages.conf" | grep -qx '[[:space:]]*herdr'; then
upstream_commit "Smoketest: herdr-bin for herdr" '
sed -i "s/^\([[:space:]]*\)herdr$/\1herdr-bin/" packages.conf'
fi
cd_install
assert_status 0
run_in_vm reset "git -C ~/.local/share/coredesktop reset -q --hard $(q "$sha")"
assert_status 0
vm_reboot
upstream_set "$SMOKETEST_REF"
cd_update
assert_status 0
vm_reboot
health
fingerprint "$SMOKETEST_RESULTS/updated.fingerprint"
assert_same_fingerprint "$(reference_fingerprint)" "$SMOKETEST_RESULTS/updated.fingerprint"
}