From 7a49df448f70fc2970d7e415d12507add39749b9 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Sat, 18 Jul 2026 18:27:54 +0200 Subject: [PATCH] test-infra: preflight daemon/compose checks + Colima runtime docs The infra previously assumed Docker Desktop: an implicitly running daemon and bundled CLI plugins. On the Colima runtime (free OSS, CLI-first) neither is implicit, and a missing daemon surfaced as cryptic compose errors. run.sh now fails fast with the exact setup commands (colima start with --vz-rosetta for fast amd64 legs, plugin symlinks for the brew docker client) and documents the runtime in the header. Signed-off-by: Martin Vogel --- test-infrastructure/run.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test-infrastructure/run.sh b/test-infrastructure/run.sh index ea624e4ed..94ec20fa7 100755 --- a/test-infrastructure/run.sh +++ b/test-infrastructure/run.sh @@ -30,11 +30,31 @@ # ./test-infrastructure/run.sh lint # clang-format + cppcheck # ./test-infrastructure/run.sh shell # debug shell +# Runtime: any Docker-compatible daemon. On macOS we use Colima (free OSS): +# brew install colima docker docker-compose docker-buildx +# ln -sf /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose +# ln -sf /opt/homebrew/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx +# colima start --vm-type vz --vz-rosetta --cpu 12 --memory 16 +# --vz-rosetta is required for fast amd64 legs (QEMU otherwise). Autostart at +# login: brew services start colima. + set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" COMPOSE="docker compose -f $ROOT/test-infrastructure/docker-compose.yml" +if ! docker info >/dev/null 2>&1; then + echo "ERROR: no Docker daemon reachable." >&2 + echo " Start one first — on macOS: colima start --vm-type vz --vz-rosetta --cpu 12 --memory 16" >&2 + echo " (current context: $(docker context show 2>/dev/null || echo unknown))" >&2 + exit 1 +fi +if ! docker compose version >/dev/null 2>&1; then + echo "ERROR: docker compose plugin missing." >&2 + echo " brew install docker-compose && ln -sf /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose" >&2 + exit 1 +fi + case "${1:-full}" in full) echo "=== Linux arm64: test + build ==="