feat(v2): T2 运维层 hw_profile + llama_server 进程管理
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"""测试辅助:获取空闲 TCP 端口。"""
|
||||
import socket
|
||||
|
||||
|
||||
def free_port() -> int:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
s.bind(("127.0.0.1", 0))
|
||||
return s.getsockname()[1]
|
||||
Reference in New Issue
Block a user