From 2172c904e34e044ba938d5a4948182d9fd878816 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 20 May 2026 12:02:47 -0500 Subject: docs: document the unit-test layer and add a make test-unit target The README only covered the VM integration harness. The unit suites under tests/ (one directory per script, fake binaries on PATH) went unmentioned, so a contributor adding a .local/bin script had no way to know they existed or how to run them. I added a make test-unit target that runs every tests/*/test_*.py suite explicitly. unittest discover can't find them because the per-script directory names are hyphenated and aren't valid package paths. Then I split the README Testing section into Unit and VM-integration layers, added a guide for adding a suite, and pointed Contributing at test-unit for script changes. --- Makefile | 15 ++++++++++++++- README.md | 24 +++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 31c258e..9945126 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ DE := $(filter dwm hyprland,$(MAKECMDGOALS)) # Extract DEST from command line for import (e.g., 'make import common' -> DEST=common) DEST := $(filter common dwm hyprland,$(MAKECMDGOALS)) -.PHONY: help deps stow restow reset unstow import test test-keep test-vm-base common dwm hyprland +.PHONY: help deps stow restow reset unstow import test-unit test test-keep test-vm-base common dwm hyprland # Default target - show help help: @@ -30,6 +30,7 @@ help: @echo " reset Resolve conflicts, keep repo version - requires DE" @echo " unstow Remove all symlinks - requires DE" @echo " import Import new app configs into repo (fzf) - requires dest" + @echo " test-unit Run fast unit tests for scripts (no VM needed)" @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)" @@ -161,6 +162,18 @@ import: check-dest echo ""; \ echo "Done. Don't forget to: git add -A && git commit" +# Run the fast unit-test suites for individual scripts (no VM needed). +# One suite per tests/