From 25513d9631c182a9b5df5b19cb9450b671e67d39 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 24 Feb 2026 07:57:34 -0600 Subject: feat: add Makefile targets for manual VM testing Add vm, vm-multi, vm-multi3, vm-boot, and vm-clean targets. Update README to reference make targets instead of raw script invocations. --- Makefile | 47 ++++++++++++++++++++++++++++++++++++++++------- README.org | 23 +++++++++++++---------- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index a870255..bc77a4d 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,25 @@ # Makefile for archangel ISO build and testing # # Usage: -# make test - Run lint -# make test-install - Run install tests in VM (slow) -# make build - Build the ISO -# make release - Full test + build + deploy -# make clean - Clean build artifacts -# make lint - Run shellcheck on all scripts +# make build - Build the ISO +# make lint - Run shellcheck on all scripts +# make test - Run lint +# make test-install - Run all automated install tests in VMs (slow) +# make release - Full test + build + deploy +# +# Manual VM testing: +# make vm - Boot ISO in a single-disk VM +# make vm-multi - Boot ISO in a 2-disk VM (mirror/RAID) +# make vm-multi3 - Boot ISO in a 3-disk VM (raidz1) +# make vm-boot - Boot from installed disk (after install) +# make vm-clean - Remove VM disks and OVMF vars +# +# make clean - Clean build artifacts +# make distclean - Clean everything including releases # # Test configurations are in scripts/test-configs/ -.PHONY: test test-install build release clean lint +.PHONY: test test-install build release clean distclean lint vm vm-multi vm-multi3 vm-boot vm-clean # Lint all bash scripts lint: @@ -42,6 +51,30 @@ release: test test-install @echo "==> Release complete:" @ls -lh archangel-*.iso +# --- Manual VM testing --- + +# Boot ISO in a single-disk VM +vm: + ./scripts/test-vm.sh + +# Boot ISO in a 2-disk VM (for mirror/RAID testing) +vm-multi: + ./scripts/test-vm.sh --multi-disk + +# Boot ISO in a 3-disk VM (for raidz1 testing) +vm-multi3: + ./scripts/test-vm.sh --multi-disk=3 + +# Boot from installed disk (after running install in VM) +vm-boot: + ./scripts/test-vm.sh --boot-disk + +# Remove VM disks and start fresh +vm-clean: + ./scripts/test-vm.sh --clean + +# --- Cleanup --- + # Clean build artifacts clean: @echo "==> Cleaning..." diff --git a/README.org b/README.org index ccf273c..1075020 100644 --- a/README.org +++ b/README.org @@ -43,12 +43,15 @@ Archangel currently uses linux-lts for stability. Choosing linux and linux-zen k # Build the ISO (requires sudo) make build -# Test in a VM +# Launch a VM for interactive testing +make vm # single disk +make vm-multi # 2 disks (mirror/RAID) +make vm-multi3 # 3 disks (raidz1) +make vm-boot # boot from installed disk +make vm-clean # remove VM disks, start fresh + +# Run automated install tests (all configs) make test-install - -# Or launch a VM manually for interactive testing -./scripts/test-vm.sh -./scripts/test-vm.sh --multi-disk # multiple disks for RAID #+END_SRC Boot the ISO and run ~archangel~ to start the installation. @@ -147,7 +150,7 @@ modifying the installer or build scripts to catch regressions. ** Basic VM Test #+BEGIN_SRC bash -./scripts/test-vm.sh +make vm #+END_SRC This creates a 50GB virtual disk and boots the ISO. @@ -156,10 +159,10 @@ This creates a 50GB virtual disk and boots the ISO. #+BEGIN_SRC bash # Two 50GB disks (for mirror) -./scripts/test-vm.sh --multi-disk +make vm-multi # Three 50GB disks (for raidz1) -./scripts/test-vm.sh --multi-disk=3 +make vm-multi3 #+END_SRC ** SSH Access to VM @@ -177,13 +180,13 @@ sshpass -p archangel ssh -p 2222 root@localhost ** Clean VM State #+BEGIN_SRC bash -./scripts/test-vm.sh --clean +make vm-clean #+END_SRC ** Boot from Installed Disk #+BEGIN_SRC bash -./scripts/test-vm.sh --boot-disk +make vm-boot #+END_SRC * Installation Walkthrough -- cgit v1.2.3