Skip to content

Commit 61274b2

Browse files
ggerganovmglambda
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 7ac061a commit 61274b2

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
@@ -112,9 +112,9 @@ jobs:
112112
-DGGML_OPENMP=OFF ;
113113
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
114114
115-
- name: Build
116-
id: cmake_build
117-
if: ${{ matrix.sanitizer != 'THREAD' }}
115+
- name: Build (sanitizers)
116+
id: cmake_build_sanitizers
117+
if: ${{ matrix.sanitizer != '' && matrix.sanitizer != 'THREAD' }}
118118
run: |
119119
cmake -B build \
120120
-DGGML_NATIVE=OFF \
@@ -124,12 +124,31 @@ jobs:
124124
-DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON ;
125125
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
126126
127+
- name: Build (sanitizers)
128+
id: cmake_build
129+
if: ${{ matrix.sanitizer == '' }}
130+
run: |
131+
cmake -B build \
132+
-DGGML_NATIVE=OFF \
133+
-DLLAMA_BUILD_SERVER=ON \
134+
-DLLAMA_CURL=ON \
135+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ;
136+
cmake --build build --config ${{ matrix.build_type }} -j $(nproc) --target llama-server
137+
127138
- name: Tests
128139
id: server_integration_tests
140+
if: ${{ matrix.sanitizer == '' }}
129141
run: |
130142
cd examples/server/tests
131143
./tests.sh
132144
145+
- name: Tests (sanitizers)
146+
id: server_integration_tests_sanitizers
147+
if: ${{ matrix.sanitizer != '' }}
148+
run: |
149+
cd examples/server/tests
150+
LLAMA_SANITIZE=1 ./tests.sh
151+
133152
- name: Slow tests
134153
id: server_integration_tests_slow
135154
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)