From 3cee8d1d7d70e23ebc75583a96cccbb872657de5 Mon Sep 17 00:00:00 2001 From: Hasan Basbunar Date: Wed, 2 Dec 2026 02:23:14 +0100 Subject: [PATCH] tests: the OCR lane's engine port in the registry's check, its two ports in the suite's guard Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- tests/test_lane_registry.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f0cd273..79396e39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1452,7 +1452,7 @@ jobs: probe="$(mktemp -d)" # tests/run_suite.py loads the same hook into every python it starts (its sitecustomize.py), # beside the one that compares each file's environment at its start and at its exit. - export QWEN38_CONTACT_LOG="$probe/contacts" QWEN38_SERVING_PORTS=30000,30001,30002,30020,30022,30024,30025,30026,30028,30030,30036,30090,30091,4096 + export QWEN38_CONTACT_LOG="$probe/contacts" QWEN38_SERVING_PORTS=30000,30001,30002,30020,30022,30024,30025,30026,30028,30030,30032,30034,30036,30090,30091,4096 before="$(find "$witness" -type f -exec sha256sum {} + | sort)" ports_before="$(ss -Htln 2>/dev/null | awk '{print $4}' | sort || true)" # The suite runs under tests/suite_reaper.py, a child subreaper: every process it diff --git a/tests/test_lane_registry.py b/tests/test_lane_registry.py index d8d0a763..1926fdb0 100644 --- a/tests/test_lane_registry.py +++ b/tests/test_lane_registry.py @@ -1346,7 +1346,9 @@ class TheOtherScriptsSayTheSame(unittest.TestCase): m, where = one(rel, src, r'^PORT="\$\{[A-Z][A-Z0-9_]*_PORT:-\$\([a-z_]+ --port\)\}"; PORT="\$\{PORT:-(\d+)\}"$') p.same(f"{where} its PORT", [int(m.group(1))], f["ports"][:1]) got, where = finds(rel, src, r"^ASR_PORT=\$\(\(PORT \+ (\d+)\)\)$") - p.same(f"{where} its ASR_PORT", [f["ports"][0] + int(x) for x in got], f["ports"][1:]) + # the OvisOCR3 lane's engine, on a port of its own behind its front (its installer's ENGINE_PORT) + engine, _ = finds(rel, src, r'^ENGINE_PORT="\$\{OCR_ENGINE_PORT:-[^\n]*\}"; ENGINE_PORT="\$\{ENGINE_PORT:-(\d+)\}"$') + p.same(f"{where} its ASR_PORT and ENGINE_PORT", [f["ports"][0] + int(x) for x in got] + [int(x) for x in engine], f["ports"][1:]) m, where = one("speech-server.py", text_of("speech-server.py"), r'add_argument\("--port", type=int, default=(\d+)\)\n\s*ap\.add_argument\("--asr-url", default="http://127\.0\.0\.1:(\d+)"\)') p.same(f"{where} its --port and --asr-url", [int(x) for x in m.groups()], LANES["speech"]["ports"])