]> git.ekhem.eu.org Git - guix.git/commitdiff
[tests] Add test-vps target and Stop hook integration.
authorJakub Czajka <jakub@ekhem.eu.org>
Tue, 14 Jul 2026 10:02:39 +0000 (10:02 +0000)
committerJakub Czajka <jakub@ekhem.eu.org>
Tue, 14 Jul 2026 10:02:39 +0000 (10:02 +0000)
Add test-vps and check-vps Makefile targets.  check-vps runs the
build and test in one command.

The Stop hook now auto-queues test-vps after a successful
build-vps-system.  On the next Stop iteration, the test suite runs
in a VM.

Co-Authored-By: Claude <noreply@anthropic.com>
.claude/hooks/guix-build
Makefile

index 911b847384a8557e618541a520afb4687e1c927d..6115d8d45c4881715478db97183f0d7f47bb949e 100755 (executable)
@@ -73,6 +73,13 @@ then
     }
     $GUIX_BIN/sed --in-place '1d' "$QUEUE_FILE"
 
+    # Auto-queue the VPS test suite after a successful VPS build.
+    case "$target" in
+        build-vps-system)
+            $GUIX_BIN/echo "test-vps" >> "$QUEUE_FILE"
+            ;;
+    esac
+
     exec 1>&2
     $GUIX_BIN/echo "Stop to continue."
     exit 2
index 2ffe710ea4abe55b117f6bf0d9c7a57e8e5376ff..aa7ad7431d2c617a4b2995cb88ef2f487a7de486 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,14 @@ build-vps-home:
 
 build-vps: build-vps-system build-vps-home
 
+# VPS test suite -- boots a VM and runs all test cases.
+test-vps:
+       GUIX_PACKAGE_PATH=$(CURDIR) guix system test \
+           $(CURDIR)/tests/vps-base.scm
+
+# Build the VPS configuration and run the test suite.
+check-vps: build-vps-system test-vps
+
 tags:
        find $(guix-store) -wholename "*guix-$(guix-version)*.scm" -or \
                -wholename "*guix-module-union*.scm" -or \