feat: add test:system command to run.sh
Extend the test runner to support system-level tests for VM boot verification and runtime testing. Changes: - Add test:system command for system tests only - Update main test command to include system tests - System tests cover boot, Secure Boot, and FDE New command: ./run.sh test:system This allows running system tests independently when prerequisites (libvirt, ISO) are available. 💘 Generated with Crush Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
12
run.sh
12
run.sh
@@ -25,6 +25,7 @@ usage() {
|
|||||||
echo " test:unit Run unit tests only"
|
echo " test:unit Run unit tests only"
|
||||||
echo " test:integration Run integration tests only"
|
echo " test:integration Run integration tests only"
|
||||||
echo " test:security Run security tests only"
|
echo " test:security Run security tests only"
|
||||||
|
echo " test:system Run system tests only (requires libvirt)"
|
||||||
echo " test:iso Test ISO with libvirt VM (runs on host)"
|
echo " test:iso Test ISO with libvirt VM (runs on host)"
|
||||||
echo " lint Run linting checks"
|
echo " lint Run linting checks"
|
||||||
echo " clean Clean build artifacts"
|
echo " clean Clean build artifacts"
|
||||||
@@ -50,7 +51,7 @@ main() {
|
|||||||
-v "${BUILD_DIR}:/build" \
|
-v "${BUILD_DIR}:/build" \
|
||||||
-e BATS_TMPDIR=/build/tmp \
|
-e BATS_TMPDIR=/build/tmp \
|
||||||
"${DOCKER_IMAGE}" \
|
"${DOCKER_IMAGE}" \
|
||||||
bash -c "cd /workspace && bats tests/simple_test.bats tests/unit/ tests/integration/ tests/security/"
|
bash -c "cd /workspace && bats tests/simple_test.bats tests/unit/ tests/integration/ tests/security/ tests/system/"
|
||||||
;;
|
;;
|
||||||
test:unit)
|
test:unit)
|
||||||
echo "Running unit tests..."
|
echo "Running unit tests..."
|
||||||
@@ -79,6 +80,15 @@ main() {
|
|||||||
"${DOCKER_IMAGE}" \
|
"${DOCKER_IMAGE}" \
|
||||||
bash -c "cd /workspace && bats tests/security/"
|
bash -c "cd /workspace && bats tests/security/"
|
||||||
;;
|
;;
|
||||||
|
test:system)
|
||||||
|
echo "Running system tests..."
|
||||||
|
docker run --rm \
|
||||||
|
-v "${SCRIPT_DIR}:/workspace:ro" \
|
||||||
|
-v "${BUILD_DIR}:/build" \
|
||||||
|
-e BATS_TMPDIR=/build/tmp \
|
||||||
|
"${DOCKER_IMAGE}" \
|
||||||
|
bash -c "cd /workspace && bats tests/system/"
|
||||||
|
;;
|
||||||
lint)
|
lint)
|
||||||
echo "Running linting checks..."
|
echo "Running linting checks..."
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
|
|||||||
Reference in New Issue
Block a user