From e7850dc4650fa7e687ab5fe8f5ce924b14719192 Mon Sep 17 00:00:00 2001 From: claude Date: Sun, 19 Jul 2026 01:08:29 +0000 Subject: [PATCH] fix(coverage): skip docker integration tests on the KVM runner Docker integration tests are already covered by the integration-docker job on ubuntu-latest. On the KVM runner the Firecracker TAP/nftables pool conflicts with Docker networking, causing those tests to hang and the coverage job to never complete. Add SKIP_DOCKER_TESTS env-var support to docker_available() and set it for the integration phase of coverage.sh so only Firecracker integration tests run there. --- scripts/coverage.sh | 4 ++-- tests/_docker.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/coverage.sh b/scripts/coverage.sh index fb03294..0665a69 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -26,8 +26,8 @@ rm -f .coverage echo "== unit ==" >&2 "$PY" -m coverage run -m unittest discover -t . -s tests/unit -echo "== integration (skips without Docker) ==" >&2 -BOT_BOTTLE_BACKEND=firecracker \ +echo "== integration (firecracker; skips docker tests) ==" >&2 +BOT_BOTTLE_BACKEND=firecracker SKIP_DOCKER_TESTS=1 \ "$PY" -m coverage run --append -m unittest discover -t . -s tests/integration echo "== combined report ==" >&2 diff --git a/tests/_docker.py b/tests/_docker.py index 25b8968..4de74fb 100644 --- a/tests/_docker.py +++ b/tests/_docker.py @@ -2,12 +2,15 @@ from __future__ import annotations +import os import shutil import subprocess import unittest def docker_available() -> bool: + if os.environ.get("SKIP_DOCKER_TESTS"): + return False if shutil.which("docker") is None: return False try: