#!/bin/bash # Behaviour: both runtime images exist and fit the 2.0 GB cap each (NFR-01). # Size is podman inspect .Size (documented proxy for unpacked size). # SKIP = P0 has not built the images yet. set -u cd "$(dirname "$0")/.." || exit 1 . .config/xfwl4-check/acceptance.conf command -v podman >/dev/null 2>&1 || { echo "SKIP arch: podman not installed"; exit 0; } for img in "$image_x11" "$image_wayland"; do podman image exists "$img" >/dev/null 2>&1 || { echo "SKIP arch: image $img not built yet (P0)"; exit 0; } done fail=0; msg="" for img in "$image_x11" "$image_wayland"; do size=$(podman image inspect --format '{{.Size}}' "$img" 2>/dev/null) || { echo "FAIL arch: cannot inspect $img"; exit 1; } msg="$msg $img=${size}B" [ "$size" -le "$max_image_bytes" ] || { echo "FAIL arch: $img ${size}B over cap ${max_image_bytes}B"; fail=1; } done [ "$fail" = 0 ] && echo "PASS arch: both images within cap ($msg )" || exit 1