From 704355db552f1c276bcaa879f54eb2e25663eca0 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Tue, 14 Jul 2026 10:02:39 +0000 Subject: [PATCH] [tests] Add test-vps target and Stop hook integration. 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 --- .claude/hooks/guix-build | 7 +++++++ Makefile | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/.claude/hooks/guix-build b/.claude/hooks/guix-build index 911b847..6115d8d 100755 --- a/.claude/hooks/guix-build +++ b/.claude/hooks/guix-build @@ -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 diff --git a/Makefile b/Makefile index 2ffe710..aa7ad74 100644 --- 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 \ -- 2.47.3