mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-26 09:55:48 +08:00
Put the vcpkg DLL directory on PATH for the cmake Windows tests
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
Update HTML documentation / docs (push) Waiting to run
Update wiki / wiki (push) Waiting to run
Some checks are pending
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Waiting to run
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Waiting to run
Update HTML documentation / docs (push) Waiting to run
Update wiki / wiki (push) Waiting to run
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.
This commit is contained in:
parent
e78c1d2c07
commit
137ff3beea
1
.github/workflows/c-cpp-cmake.yml
vendored
1
.github/workflows/c-cpp-cmake.yml
vendored
@ -58,6 +58,7 @@ jobs:
|
|||||||
dir
|
dir
|
||||||
cmake --build .
|
cmake --build .
|
||||||
cd ..
|
cd ..
|
||||||
|
set "PATH=%PATH%;c:/vcpkg/installed/x64-windows/bin"
|
||||||
python tests\run.py || exit /b 1
|
python tests\run.py || exit /b 1
|
||||||
rmdir /s /q build
|
rmdir /s /q build
|
||||||
|
|
||||||
|
|||||||
@ -419,15 +419,24 @@ class Tester:
|
|||||||
return self._record(unexpected != actual, label,
|
return self._record(unexpected != actual, label,
|
||||||
f"anything but {unexpected!r}", actual)
|
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"<no reply: {value.error}>"
|
||||||
|
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):
|
def contains(self, haystack, needle, label):
|
||||||
if isinstance(haystack, Response):
|
haystack = self._as_text(haystack)
|
||||||
haystack = haystack.text
|
|
||||||
return self._record(needle in haystack, label,
|
return self._record(needle in haystack, label,
|
||||||
f"text containing {needle!r}", self._clip(haystack))
|
f"text containing {needle!r}", self._clip(haystack))
|
||||||
|
|
||||||
def not_contains(self, haystack, needle, label):
|
def not_contains(self, haystack, needle, label):
|
||||||
if isinstance(haystack, Response):
|
haystack = self._as_text(haystack)
|
||||||
haystack = haystack.text
|
|
||||||
return self._record(needle not in haystack, label,
|
return self._record(needle not in haystack, label,
|
||||||
f"text without {needle!r}", self._clip(haystack))
|
f"text without {needle!r}", self._clip(haystack))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user