build: remove testing.sh in favor of runit.sh; add claude.md reference
Replace inline boot testing with standalone runit.sh runner for clarity: - Remove scripts/lib/testing.sh source and boot_tests stage from build.sh - Remove --skip-tests option from build.sh and rebuild-after-zinit.sh - Update all docs to reference runit.sh for QEMU/cloud-hypervisor testing - Add comprehensive claude.md as AI assistant entry point with guidelines Testing is now fully decoupled from build pipeline; use ./runit.sh for QEMU/cloud-hypervisor validation after builds complete.
This commit is contained in:
@@ -15,7 +15,6 @@ source "${SCRIPT_DIR}/lib/alpine.sh"
|
||||
source "${SCRIPT_DIR}/lib/components.sh"
|
||||
source "${SCRIPT_DIR}/lib/initramfs.sh"
|
||||
source "${SCRIPT_DIR}/lib/kernel.sh"
|
||||
source "${SCRIPT_DIR}/lib/testing.sh"
|
||||
|
||||
# Build configuration loaded from config/build.conf via common.sh
|
||||
# Environment variables can override config file values
|
||||
@@ -42,7 +41,6 @@ ZINIT_CONFIG_DIR="${CONFIG_DIR}/zinit"
|
||||
# Build options
|
||||
USE_CONTAINER="${USE_CONTAINER:-auto}"
|
||||
CLEAN_BUILD="${CLEAN_BUILD:-false}"
|
||||
SKIP_TESTS="${SKIP_TESTS:-false}"
|
||||
KEEP_ARTIFACTS="${KEEP_ARTIFACTS:-false}"
|
||||
|
||||
# Display usage information
|
||||
@@ -54,7 +52,6 @@ Usage: $0 [OPTIONS]
|
||||
|
||||
Options:
|
||||
--clean Clean build (remove all artifacts first)
|
||||
--skip-tests Skip boot tests
|
||||
--keep-artifacts Keep build artifacts after completion
|
||||
--force-rebuild Force rebuild all stages (ignore completion markers)
|
||||
--rebuild-from=STAGE Force rebuild from specific stage onward
|
||||
@@ -92,10 +89,6 @@ function parse_arguments() {
|
||||
CLEAN_BUILD="true"
|
||||
shift
|
||||
;;
|
||||
--skip-tests)
|
||||
SKIP_TESTS="true"
|
||||
shift
|
||||
;;
|
||||
--keep-artifacts)
|
||||
KEEP_ARTIFACTS="true"
|
||||
shift
|
||||
@@ -411,18 +404,9 @@ function main_build_process() {
|
||||
kernel_build_with_initramfs "$KERNEL_CONFIG" "$INITRAMFS_ARCHIVE" "$kernel_output"
|
||||
export KERNEL_OUTPUT="$kernel_output"
|
||||
}
|
||||
|
||||
function stage_boot_tests() {
|
||||
if [[ "$SKIP_TESTS" != "true" ]]; then
|
||||
# Ensure KERNEL_OUTPUT is set (for incremental builds)
|
||||
if [[ -z "${KERNEL_OUTPUT:-}" ]]; then
|
||||
KERNEL_OUTPUT="${DIST_DIR}/vmlinuz.efi"
|
||||
export KERNEL_OUTPUT
|
||||
fi
|
||||
testing_run_all "$KERNEL_OUTPUT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Boot tests removed - use runit.sh for testing instead
|
||||
|
||||
# Run all stages with incremental tracking
|
||||
stage_run "alpine_extract" stage_alpine_extract
|
||||
stage_run "alpine_configure" stage_alpine_configure
|
||||
@@ -442,8 +426,7 @@ function main_build_process() {
|
||||
stage_run "initramfs_create" stage_initramfs_create
|
||||
stage_run "initramfs_test" stage_initramfs_test
|
||||
stage_run "kernel_build" stage_kernel_build
|
||||
stage_run "boot_tests" stage_boot_tests
|
||||
|
||||
|
||||
# Calculate build time
|
||||
local end_time=$(date +%s)
|
||||
local build_time=$((end_time - start_time))
|
||||
@@ -501,16 +484,13 @@ function main() {
|
||||
log_info "Starting container build"
|
||||
docker_detect_runtime
|
||||
docker_build_container
|
||||
|
||||
|
||||
# Pass through relevant arguments to container
|
||||
local container_args=""
|
||||
if [[ "$SKIP_TESTS" == "true" ]]; then
|
||||
container_args="$container_args --skip-tests"
|
||||
fi
|
||||
if [[ "$KEEP_ARTIFACTS" == "true" ]]; then
|
||||
container_args="$container_args --keep-artifacts"
|
||||
fi
|
||||
|
||||
|
||||
docker_run_build "./scripts/build.sh${container_args}"
|
||||
else
|
||||
log_error "Container runtime required (podman or docker)"
|
||||
|
||||
Reference in New Issue
Block a user