fix: resolve 11 test failures, clean up stale files, add NVMe build cache
Test Fixes: - Fixed grep regex matching `test:iso)` instead of `iso|iso:demo)` by using `grep -F` for literal string matching in 3 test files - Increased grep context from -A 5 to -A 15 for FDE reference tests since FDE mention is 9+ lines into the iso command block Stale Files: - Deleted test-iso.sh (merged into run.sh in Session 4) - Deleted verify.sh (orphaned, never referenced anywhere) Documentation: - Fixed stale test file references in COMPLIANCE.md - Updated TEST-COVERAGE.md to remove "delegates to test-iso.sh" - Added JOURNAL.md entry with full audit findings - Updated STATUS.md timestamp NVMe Build Cache (from previous session, was uncommitted): - Added Docker volume `knel-football-cache` for build caching - Added `clean:cache` and `cache` commands to run.sh - Cache preserves bootstrap + package downloads between builds Test Results: 786 pass, 0 fail, 16 VM skip 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
34
run.sh
34
run.sh
@@ -13,6 +13,7 @@ readonly DOCKER_IMAGE="knel-football-dev:latest"
|
||||
readonly OUTPUT_DIR="${SCRIPT_DIR}/output"
|
||||
readonly BUILD_DIR="${SCRIPT_DIR}/tmp"
|
||||
readonly BUILD_LOG="/tmp/knel-iso-build.log"
|
||||
readonly CACHE_VOLUME="knel-football-cache"
|
||||
|
||||
# VM Testing Configuration (system libvirt for virt-manager visibility, /tmp for no sudo)
|
||||
readonly ISO_PATH="${SCRIPT_DIR}/output/knel-football-secure.iso"
|
||||
@@ -854,6 +855,8 @@ Build Commands:
|
||||
iso:demo Build demo/CI ISO (hardcoded test credentials, serial console)
|
||||
monitor [secs] Monitor build progress (default: check every 180s)
|
||||
clean Clean build artifacts
|
||||
clean:cache Remove NVMe build cache (force full rebuild)
|
||||
cache Show build cache status
|
||||
|
||||
Test Commands:
|
||||
test Run all tests
|
||||
@@ -966,6 +969,18 @@ main() {
|
||||
rm -rf "${OUTPUT_DIR:?}"/*
|
||||
rm -rf "${BUILD_DIR:?}"/*
|
||||
;;
|
||||
clean:cache)
|
||||
echo "Removing NVMe build cache (Docker volume: ${CACHE_VOLUME})..."
|
||||
docker volume rm "${CACHE_VOLUME}" 2>/dev/null || echo "Cache volume not found"
|
||||
;;
|
||||
cache)
|
||||
echo "Build cache status (Docker volume: ${CACHE_VOLUME}):"
|
||||
if docker volume inspect "${CACHE_VOLUME}" &>/dev/null; then
|
||||
docker run --rm -v "${CACHE_VOLUME}:/cache" alpine sh -c 'echo "Size: $(du -sh /cache 2>/dev/null | cut -f1)" && ls -la /cache/'
|
||||
else
|
||||
echo "No cache volume exists (will be created on next build)"
|
||||
fi
|
||||
;;
|
||||
validate)
|
||||
echo "Running ISO validation..."
|
||||
"${SCRIPT_DIR}/scripts/validate-iso.sh"
|
||||
@@ -1003,6 +1018,7 @@ main() {
|
||||
--user root \
|
||||
-v "${SCRIPT_DIR}:/workspace:ro" \
|
||||
-v "${OUTPUT_DIR}:/output" \
|
||||
-v "${CACHE_VOLUME}:/cache" \
|
||||
-e TZ="America/Chicago" \
|
||||
-e DEBIAN_FRONTEND="noninteractive" \
|
||||
-e LC_ALL="C" \
|
||||
@@ -1044,6 +1060,17 @@ if [ "${KNEL_BUILD_MODE}" = "demo" ]; then
|
||||
fi
|
||||
fi &&
|
||||
|
||||
# Restore build cache from NVMe Docker volume
|
||||
# Preserves bootstrap + package downloads between builds (~5 min saved)
|
||||
if [ -d /cache/bootstrap ]; then
|
||||
echo "Restoring build cache from NVMe..." &&
|
||||
mkdir -p ./cache &&
|
||||
cp -a /cache/* ./cache/ &&
|
||||
echo "Cache restored (bootstrap + packages)"
|
||||
else
|
||||
echo "No build cache found (first build or cache cleared)"
|
||||
fi &&
|
||||
|
||||
# Create Secure Boot binary hook inline
|
||||
echo "Creating Secure Boot hook..." &&
|
||||
mkdir -p config/hooks/binary &&
|
||||
@@ -1209,6 +1236,13 @@ chmod +x config/hooks/binary/0200-secureboot-uki.hook &&
|
||||
|
||||
echo "Starting ISO build..." &&
|
||||
timeout 3600 lb build &&
|
||||
|
||||
# Save build cache to NVMe Docker volume for next rebuild
|
||||
echo "Saving build cache to NVMe..." &&
|
||||
mkdir -p /cache &&
|
||||
cp -a ./cache/* /cache/ 2>/dev/null || true &&
|
||||
echo "Cache saved (bootstrap + packages)" &&
|
||||
|
||||
ISO_FILE=$(find . -name "*.iso" -type f | head -1) &&
|
||||
if [ -n "$ISO_FILE" ]; then
|
||||
echo "ISO created: $ISO_FILE"
|
||||
|
||||
Reference in New Issue
Block a user