feat: initial commit — void-installer multi-profile (stable-cinnamon + mainline-niri)
This commit is contained in:
34
tests/interactive-qemu.sh
Executable file
34
tests/interactive-qemu.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Launch QEMU with the latest installer ISO for INTERACTIVE testing.
|
||||
# Use this when you want to drive the TUI yourself.
|
||||
set -Eeuo pipefail
|
||||
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
OUT_DIR="$PROJECT_DIR/out"
|
||||
ISO="${ISO:-$(ls -t "$OUT_DIR"/void-install-*.iso 2>/dev/null | grep -v TEST | head -1 || true)}"
|
||||
DISK="${DISK:-$OUT_DIR/test-disk.img}"
|
||||
RAM_MB="${RAM_MB:-4096}"
|
||||
SMP="${SMP:-4}"
|
||||
|
||||
OVMF_CODE="${OVMF_CODE:-/usr/share/OVMF/OVMF_CODE.fd}"
|
||||
OVMF_VARS_TPL="${OVMF_VARS_TPL:-/usr/share/OVMF/OVMF_VARS.fd}"
|
||||
[[ -r "$OVMF_CODE" ]] || { echo "no OVMF — install ovmf"; exit 1; }
|
||||
[[ -r "$ISO" ]] || { echo "no ISO at $ISO — run 'make iso' first"; exit 1; }
|
||||
|
||||
if [[ ! -f "$DISK" ]]; then
|
||||
"$PROJECT_DIR/tests/make-test-disk.sh" "$DISK"
|
||||
fi
|
||||
VARS="$OUT_DIR/OVMF_VARS.interactive.fd"
|
||||
[[ -f "$VARS" ]] || cp "$OVMF_VARS_TPL" "$VARS"
|
||||
|
||||
exec qemu-system-x86_64 \
|
||||
-name void-installer-interactive \
|
||||
-machine q35,accel=kvm:tcg -cpu max \
|
||||
-m "$RAM_MB" -smp "$SMP" \
|
||||
-drive "if=pflash,format=raw,readonly=on,file=$OVMF_CODE" \
|
||||
-drive "if=pflash,format=raw,file=$VARS" \
|
||||
-drive "if=virtio,file=$DISK,format=raw,cache=none" \
|
||||
-cdrom "$ISO" \
|
||||
-boot menu=on \
|
||||
-netdev user,id=n0,hostfwd=tcp:127.0.0.1:2222-:22 \
|
||||
-device virtio-net-pci,netdev=n0 \
|
||||
-vga virtio -display gtk
|
||||
Reference in New Issue
Block a user