feat: vmtest.sh runs the plain-PC install check (generic) for every loader; vmprogress.sh knows the new jobs
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-09-30 14:47:40 +02:00
1 parent cb390c2dc0
commit 343ff1edda
3 files changed
+25 -17

No files matched your search

+20 -12
View File
@@ -4,6 +4,8 @@
# scripts/vmtest.sh [--install] [--window] [--screen] [boot | <loader>... | <suite>...]
# no argument everything: boot (all advertised loaders) and all suites
# boot the boot loader test (limine, systemd-boot, grub), or name loaders
# generic the plain-PC install check for every loader (vmbootloadertest.sh --quick --generic: a PC that is not a
# Steam Machine must get no Steam Machine items and no DKMS modules); part of the default run
# <suite> cli, menu, hw, installer, toggles (folders in share/vmtest/)
# --install install the boot loader VMs first from the newest Steamify ISO (asks before replacing a disk)
# --window show the VMs' windows (default: headless; one shared Konsole follows ~/vms/test.log)
@@ -18,13 +20,14 @@ here="$(cd "$(dirname "$0")" && pwd)"
repo="$(cd "$here/.." && pwd)"
iso_repo="$repo/../steamify-cachyos-live-iso"
args=("$@")
install=""; window=""; screen=false; loaders=(); suites=(); want_boot=false
install=""; window=""; screen=false; loaders=(); suites=(); want_boot=false; want_generic=false
for a in "$@"; do
case "$a" in
--install) install=--install ;;
--window) window=--window ;;
--screen) screen=true ;;
boot) want_boot=true ;;
generic) want_generic=true ;;
limine|systemd-boot|grub) loaders+=("$a"); want_boot=true ;;
*) [[ -d "$repo/share/vmtest/$a" ]] && suites+=("$a") || { echo "Unknown argument: $a" >&2; exit 2; } ;;
esac
@@ -37,14 +40,16 @@ if $screen; then
echo "Running in the screen session vmtest: screen -r vmtest (Ctrl-a d to leave it running); the summary lands in ~/vms/last-test.txt"
exit 0
fi
if [[ ${#loaders[@]} -eq 0 && ${#suites[@]} -eq 0 ]] && ! $want_boot; then
want_boot=true
if [[ ${#loaders[@]} -eq 0 && ${#suites[@]} -eq 0 ]] && ! $want_boot && ! $want_generic; then
want_boot=true; want_generic=true
for d in cli menu hw installer toggles; do [[ -d "$repo/share/vmtest/$d" ]] && suites+=("$d"); done
fi
# What the ISO advertises: the boot loaders calamares-online.sh keeps.
advertised="$(sed -n 's/.*"bootloader:\([^"]*\)".*/\1/p' "$iso_repo/archiso/airootfs/usr/local/bin/calamares-online.sh" 2>/dev/null | head -n 1)"
[[ -n "$advertised" ]] || { echo "Can't read the advertised boot loaders from $iso_repo (calamares-online.sh)" >&2; exit 2; }
$want_boot && [[ ${#loaders[@]} -eq 0 ]] && read -r -a loaders <<< "$advertised"
gloaders=() # the plain-PC install check: the same loaders as the boot loader test, or all advertised ones
if $want_generic; then if [[ ${#loaders[@]} -gt 0 ]]; then gloaders=("${loaders[@]}"); else read -r -a gloaders <<< "$advertised"; fi; fi
tested="limine systemd-boot grub" # the loaders vmbootloadertest.sh has a way to boot the other kernel for
summary="$HOME/vms/last-test.txt"
maxp="${MAX_PARALLEL:-3}" # VMs at once (4 GB RAM each in the suites, see vmsuite.sh); 5 ran fine on a 9800X3D with 64 GB
@@ -53,11 +58,14 @@ jobs_list=()
for s in toggles hw cli menu installer; do [[ " ${suites[*]} " == *" $s "* ]] && jobs_list+=("suite:$s"); done
for s in "${suites[@]}"; do [[ " toggles hw cli menu installer " == *" $s "* ]] || jobs_list+=("suite:$s"); done
for l in "${loaders[@]}"; do jobs_list+=("loader:$l"); done
run_job() { # run_job <kind:name>: output in /tmp/vmtest-<name>.out, exit status in /tmp/vmtest-<name>.rc
local kind="${1%%:*}" name="${1#*:}"
if [[ "$kind" == loader ]]; then bash "$here/vmbootloadertest.sh" "$name" $install $window > "/tmp/vmtest-$name.out" 2>&1
else bash "$here/vmsuite.sh" "$name" $window > "/tmp/vmtest-$name.out" 2>&1; fi
echo $? > "/tmp/vmtest-$name.rc"
for l in "${gloaders[@]}"; do jobs_list+=("generic:$l"); done
jobtag() { [[ "${1%%:*}" == generic ]] && echo "${1#*:}-generic" || echo "${1#*:}"; } # files and names of a job
run_job() { # run_job <kind:name>: output in /tmp/vmtest-<tag>.out, exit status in /tmp/vmtest-<tag>.rc
local kind="${1%%:*}" name="${1#*:}" tag; tag="$(jobtag "$1")"
if [[ "$kind" == loader ]]; then bash "$here/vmbootloadertest.sh" "$name" $install $window > "/tmp/vmtest-$tag.out" 2>&1
elif [[ "$kind" == generic ]]; then bash "$here/vmbootloadertest.sh" "$name" $install --quick --generic $window > "/tmp/vmtest-$tag.out" 2>&1
else bash "$here/vmsuite.sh" "$name" $window > "/tmp/vmtest-$tag.out" 2>&1; fi
echo $? > "/tmp/vmtest-$tag.rc"
}
{
echo "vmtest.sh $(date '+%F %T') branch $(git -C "$repo" branch --show-current) $(git -C "$repo" rev-parse --short HEAD)"
@@ -73,12 +81,12 @@ for job in "${jobs_list[@]}"; do
done
wait
for job in "${jobs_list[@]}"; do
name="${job#*:}"
sed -n '/^== /,$p' "/tmp/vmtest-$name.out"
total=$((total + $(cat "/tmp/vmtest-$name.rc" 2>/dev/null || echo 1)))
tag="$(jobtag "$job")"
sed -n '/^== /,$p' "/tmp/vmtest-$tag.out"
total=$((total + $(cat "/tmp/vmtest-$tag.rc" 2>/dev/null || echo 1)))
done
echo
echo "SKIP (needs a person, TESTPLAN.md): U1-U9 the app's screens, R2.2 the first desktop login, H-Real the real Steam Machine"
echo "== total: $total failed check(s); boot loaders: ${loaders[*]:-none}; suites: ${suites[*]:-none}"
echo "== total: $total failed check(s); boot loaders: ${loaders[*]:-none}; plain PC: ${gloaders[*]:-none}; suites: ${suites[*]:-none}"
} 2>&1 | tee "$summary"
exit "$(grep -c '^FAIL' "$summary")"