Skip to content

Commit 7db8396

Browse files
ggerganovanagri
authored andcommitted
tests : increase timeout when sanitizers are enabled (ggml-org#11300)
* tests : increase timeout when sanitizers are enabled * tests : add DEFAULT_HTTP_TIMEOUT
1 parent 47874a1 commit 7db8396

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/workflows/server.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ jobs:
132132
-DGGML_OPENMP=OFF ;
133133
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
134134
135-
- name: Build
136-
id: cmake_build
137-
if: ${{ matrix.sanitizer != 'THREAD' }}
135+
- name: Build (sanitizers)
136+
id: cmake_build_sanitizers
137+
if: ${{ matrix.sanitizer != '' && matrix.sanitizer != 'THREAD' }}
138138
run: |
139139
cmake -B build \
140140
-DGGML_NATIVE=OFF \
@@ -144,12 +144,31 @@ jobs:
144144
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ;
145145
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
146146
147+
- name: Build (sanitizers)
148+
id: cmake_build
149+
if: ${{ matrix.sanitizer == '' }}
150+
run: |
151+
cmake -B build \
152+
-DGGML_NATIVE=OFF \
153+
-DLLAMA_BUILD_SERVER=ON \
154+
-DLLAMA_CURL=ON \
155+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ;
156+
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
157+
147158
- name: Tests
148159
id: server_integration_tests
160+
if: ${{ matrix.sanitizer == '' }}
149161
run: |
150162
cd examples/server/tests
151163
./tests.sh
152164
165+
- name: Tests (sanitizers)
166+
id: server_integration_tests_sanitizers
167+
if: ${{ matrix.sanitizer != '' }}
168+
run: |
169+
cd examples/server/tests
170+
LLAMA_SANITIZE=1 ./tests.sh
171+
153172
- name: Slow tests
154173
id: server_integration_tests_slow
155174
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}

examples/server/tests/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
import wget
2727

2828

29+
DEFAULT_HTTP_TIMEOUT = 10 if "LLAMA_SANITIZE" not in os.environ else 30
30+
31+
2932
class ServerResponse:
3033
headers: dict
3134
status_code: int
@@ -88,7 +91,7 @@ def __init__(self):
8891
if "PORT" in os.environ:
8992
self.server_port = int(os.environ["PORT"])
9093

91-
def start(self, timeout_seconds: int = 10) -> None:
94+
def start(self, timeout_seconds: int | None = DEFAULT_HTTP_TIMEOUT) -> None:
9295
if "LLAMA_SERVER_BIN_PATH" in os.environ:
9396
server_path = os.environ["LLAMA_SERVER_BIN_PATH"]
9497
elif os.name == "nt":

0 commit comments

Comments
 (0)