mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
feat: faster and parallel tests, a remote runner, and a CLAUDE.md hand-off
vmsuite.sh: the ssh-ready snapshot becomes one base image, every block gets a new qcow2 overlay (no snapshot restore), each suite has its own VM directory and ssh port (2301-2305, boot loaders 2401-2403), the host's package cache is bound over pacman's, VM_MEM defaults to 4G for tests (run.sh VM_MEM, default 8G). vmtest.sh runs up to MAX_PARALLEL=3 jobs at once, slowest first. scripts/vmtest-remote.sh runs vmtest.sh on another machine (the PC) over ssh and prints the summary. CLAUDE.md and the branch cleanup skill now live in the repo. Not proven as a whole: three VMs at once and the base image work, but a complete parallel run to the end has not finished yet (P1/P2 in TODO.md); the remote runner and WSL2 are untried (R1-R2).
This commit is contained in:
1 parent
ee20bd9825
commit
0c84b8b926
10 files changed
+204
-26
No files matched your search
+23
-6
@@ -7,6 +7,7 @@
|
||||
# <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)
|
||||
# MAX_PARALLEL=3 (env) VMs at once; the slowest suites start first
|
||||
# --screen run in a detached `screen` session named vmtest: `screen -r vmtest` to watch, Ctrl-a d to leave
|
||||
# The suites run on the plain CachyOS VM ~/vms/steamify-vm (Plasma, from vminstall.sh --iso <CachyOS ISO>
|
||||
# with VM_STEAMIFY=skip); the boot loader test on ~/vms/bl-<loader> (Steamify ISO).
|
||||
@@ -46,19 +47,35 @@ advertised="$(sed -n 's/.*"bootloader:\([^"]*\)".*/\1/p' "$iso_repo/archiso/airo
|
||||
$want_boot && [[ ${#loaders[@]} -eq 0 ]] && read -r -a loaders <<< "$advertised"
|
||||
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: 8 GB RAM each, 6 vCPUs each
|
||||
# Jobs, the slowest first so the last ones are short: suites, then the boot loaders.
|
||||
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"
|
||||
}
|
||||
{
|
||||
echo "vmtest.sh $(date '+%F %T') branch $(git -C "$repo" branch --show-current) $(git -C "$repo" rev-parse --short HEAD)"
|
||||
total=0
|
||||
for l in $advertised; do
|
||||
[[ " $tested " == *" $l "* ]] || { echo "FAIL the ISO advertises $l, but there is no test for it (scripts/vmbootloadertest.sh)"; total=$((total + 1)); }
|
||||
done
|
||||
for l in "${loaders[@]}"; do
|
||||
bash "$here/vmbootloadertest.sh" "$l" $install $window > "/tmp/vmtest-$l.out" 2>&1; rc=$?
|
||||
sed -n '/^== /,$p' "/tmp/vmtest-$l.out"; total=$((total + rc))
|
||||
[[ ${#suites[@]} -gt 0 ]] && { bash "$here/vmsuite.sh" --prepare || { echo "FAIL no base image for the suites"; total=$((total + 1)); }; }
|
||||
rm -f /tmp/vmtest-*.rc
|
||||
for job in "${jobs_list[@]}"; do
|
||||
run_job "$job" &
|
||||
while [[ $(jobs -rp | wc -l) -ge $maxp ]]; do wait -n; done
|
||||
done
|
||||
for s in "${suites[@]}"; do
|
||||
bash "$here/vmsuite.sh" "$s" $window > "/tmp/vmtest-$s.out" 2>&1; rc=$?
|
||||
sed -n '/^== /,$p' "/tmp/vmtest-$s.out"; total=$((total + rc))
|
||||
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)))
|
||||
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"
|
||||
|
||||
Reference in new issue
Block a user