From 137ff3beea1146b789a0cb3f59b2f5cfed2249cf Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Tue, 25 Aug 2026 19:16:38 +0300 Subject: [PATCH] Put the vcpkg DLL directory on PATH for the cmake Windows tests The cmake Windows build links vcpkg's pcre2, whose DLL lives in c:/vcpkg/installed/x64-windows/bin. Running the tests without that on PATH started a 3proxy that died at load with 0xC0000135 before opening a socket, which the suite could only report as "never listened". Report the reason instead of leaving it blank: name the exit code, and say when a body is empty because the request failed rather than because the reply carried nothing. --- .github/workflows/c-cpp-cmake.yml | 1 + tests/harness.py | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/c-cpp-cmake.yml b/.github/workflows/c-cpp-cmake.yml index 7c76128..cb577c2 100644 --- a/.github/workflows/c-cpp-cmake.yml +++ b/.github/workflows/c-cpp-cmake.yml @@ -58,6 +58,7 @@ jobs: dir cmake --build . cd .. + set "PATH=%PATH%;c:/vcpkg/installed/x64-windows/bin" python tests\run.py || exit /b 1 rmdir /s /q build diff --git a/tests/harness.py b/tests/harness.py index a0eabf7..ad80f2e 100644 --- a/tests/harness.py +++ b/tests/harness.py @@ -419,15 +419,24 @@ class Tester: return self._record(unexpected != actual, label, f"anything but {unexpected!r}", actual) + @staticmethod + def _as_text(value): + """A reply that never arrived has no text, so report the reason.""" + if isinstance(value, Response): + if value.error: + return f"" + if not value.body and value.status is not None: + return f"<{value.status}, empty body>" + return value.text + return value + def contains(self, haystack, needle, label): - if isinstance(haystack, Response): - haystack = haystack.text + haystack = self._as_text(haystack) return self._record(needle in haystack, label, f"text containing {needle!r}", self._clip(haystack)) def not_contains(self, haystack, needle, label): - if isinstance(haystack, Response): - haystack = haystack.text + haystack = self._as_text(haystack) return self._record(needle not in haystack, label, f"text without {needle!r}", self._clip(haystack))