Skip to content

Commit 49cdfd3

Browse files
committed
fix test on windows
1 parent 3acaf58 commit 49cdfd3

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/server.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ jobs:
122122
id: server_integration_tests
123123
run: |
124124
cd examples/server/tests
125-
PORT=8888 ./tests.sh
125+
./tests.sh
126126
127127
- name: Slow tests
128128
id: server_integration_tests_slow
129129
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
130130
run: |
131131
cd examples/server/tests
132-
PORT=8888 ./tests.sh --stop --no-skipped --no-capture --tags slow
132+
SLOW_TESTS=1 ./tests.sh
133133
134134
135135
server-windows:
@@ -180,11 +180,12 @@ jobs:
180180
run: |
181181
cd examples/server/tests
182182
$env:PYTHONIOENCODING = ":replace"
183-
behave.exe --summary --stop --no-capture --exclude 'issues|wrong_usages|passkey' --tags llama.cpp
183+
pytest -v -s
184184
185185
- name: Slow tests
186186
id: server_integration_tests_slow
187187
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
188188
run: |
189189
cd examples/server/tests
190-
behave.exe --stop --no-skipped --no-capture --tags slow
190+
$env:SLOW_TESTS = "1"
191+
pytest -v -s

examples/server/tests/features/steps/steps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4+
# type: ignore
5+
46
import asyncio
57
import json
68
import os

examples/server/tests/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33

4+
# type: ignore[reportUnusedImport]
5+
46
import subprocess
57
import os
68
import sys
@@ -166,7 +168,7 @@ def server_log(in_stream, out_stream):
166168
)
167169
thread_stderr.start()
168170

169-
print(f"server pid={self.process.pid}, behave pid={os.getpid()}")
171+
print(f"server pid={self.process.pid}, pytest pid={os.getpid()}")
170172

171173
# wait for server to start
172174
start_time = time.time()

0 commit comments

Comments
 (0)