diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -5,7 +5,7 @@ # (https://git.cjennings.net/dotfiles.git). Run them from there: # cd ~/.dotfiles && make stow|restow|reset|unstow|import <de> -.PHONY: help deps test-unit test test-keep test-vm-base package-diff +.PHONY: help deps test-unit test test-keep test-vm-base test-maint package-diff # Filesystem profile for the VM harness: btrfs (default) or zfs. Selects the # base image the scripts build/use; exported so create-base-vm.sh + run-test.sh @@ -28,6 +28,7 @@ help: @echo " test Run full VM test suite (creates base VM if needed)" @echo " test-keep Run test and keep VM running for manual testing" @echo " test-vm-base Create base VM only (runs archangel)" + @echo " test-maint Run maint remedy scenarios in the VM (break/fix/assert)" @echo " package-diff Compare archsetup's declared packages vs this system" @echo "" @echo "Filesystem profile (test, test-keep, test-vm-base):" @@ -81,6 +82,18 @@ test-keep: fi @bash scripts/testing/run-test.sh --keep +# Maintenance-console remedy scenarios: break the VM, run the real +# `maint fix`, assert the post-state. Grouped batches over the clean-install +# snapshot; the base image is restored afterwards. `--list` variant to +# preview: bash scripts/testing/run-maint-scenarios.sh --list +test-maint: + @if [ ! -f $(BASE_IMAGE) ] || \ + ! qemu-img snapshot -l $(BASE_IMAGE) 2>/dev/null | grep -q "clean-install"; then \ + echo "Base VM not found or missing snapshot, creating ($(FS_PROFILE))..."; \ + bash scripts/testing/create-base-vm.sh; \ + fi + @bash scripts/testing/run-maint-scenarios.sh + # Compare the packages archsetup declares against what's installed here. # Shows declared-but-missing and installed-but-undeclared (AUR vs official). package-diff: |
