aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/create-base-vm.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-25 12:21:15 -0400
committerCraig Jennings <c@cjennings.net>2026-06-25 12:21:15 -0400
commit353b17968bf48100bbd18ed746e0fbe2fe88141f (patch)
treecf8f001bc98a9018bba6d658c48e8346c945e97d /scripts/testing/create-base-vm.sh
parent3ff0ca70b9b7333ec100bd4d4212923a077553c5 (diff)
downloadarchsetup-353b17968bf48100bbd18ed746e0fbe2fe88141f.tar.gz
archsetup-353b17968bf48100bbd18ed746e0fbe2fe88141f.zip
test(archsetup): add FS_PROFILE selector for ZFS VM coverageHEADmain
The VM harness only built one btrfs base image, so every ZFS-conditional check in the Testinfra suite skipped and the ZFS install path went untested in automation. I added an FS_PROFILE selector (btrfs default, zfs) so `make test FS_PROFILE=zfs` can target a ZFS root. init_vm_paths derives the image name from FS_PROFILE and validates it. btrfs keeps the legacy unsuffixed archsetup-base.qcow2 so existing images and invocations are untouched. The zfs profile gets archsetup-base-zfs.qcow2. create-base-vm.sh picks archsetup-test.conf vs the new archsetup-test-zfs.conf (FILESYSTEM=zfs, NO_ENCRYPT=yes for an unattended install), and the Makefile resolves the matching image for its base-VM check. The archsetup run config stays shared. archsetup reads no filesystem key. It detects ZFS from the live root via is_zfs_root, so the ZFS branch fires on its own once the base image is ZFS. The design doc is reconciled to that: no separate archsetup-vm-zfs.conf, and the non-ZFS profile is btrfs, not ext4. Building the ZFS base image and running the ZFS sweep green is next.
Diffstat (limited to 'scripts/testing/create-base-vm.sh')
-rwxr-xr-xscripts/testing/create-base-vm.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/testing/create-base-vm.sh b/scripts/testing/create-base-vm.sh
index b8a4e2b..e626813 100755
--- a/scripts/testing/create-base-vm.sh
+++ b/scripts/testing/create-base-vm.sh
@@ -20,10 +20,19 @@ source "$SCRIPT_DIR/lib/vm-utils.sh"
# Configuration
VM_IMAGES_DIR="$PROJECT_ROOT/vm-images"
-CONFIG_FILE="$SCRIPT_DIR/archsetup-test.conf"
LIVE_ISO_PASSWORD="archangel"
SNAPSHOT_NAME="clean-install"
+# FS_PROFILE (btrfs default / zfs) picks the archangel base-install config.
+# btrfs -> archsetup-test.conf, zfs -> archsetup-test-zfs.conf. The matching
+# base image name is derived from FS_PROFILE by init_vm_paths.
+FS_PROFILE="${FS_PROFILE:-btrfs}"
+if [ "$FS_PROFILE" = "btrfs" ]; then
+ CONFIG_FILE="$SCRIPT_DIR/archsetup-test.conf"
+else
+ CONFIG_FILE="$SCRIPT_DIR/archsetup-test-${FS_PROFILE}.conf"
+fi
+
# Initialize logging
mkdir -p "$PROJECT_ROOT/test-results"
LOGFILE="$PROJECT_ROOT/test-results/create-base-vm-$(date +'%Y%m%d-%H%M%S').log"