Test lần 2
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2026-06-13 13:58:38 +07:00
parent d6f22132ce
commit fbc0c11be2
13 changed files with 239 additions and 68 deletions

View File

@@ -11,6 +11,15 @@ BIN="${ROOT}/build/lidar_manager_web"
DATA_DIR="$(mktemp -d)"
SERVER_PID=""
# Dọn server test cũ trên cùng port (nếu còn).
if command -v fuser >/dev/null 2>&1; then
fuser -k "${PORT}/tcp" 2>/dev/null || true
elif command -v lsof >/dev/null 2>&1; then
PIDS="$(lsof -ti "tcp:${PORT}" 2>/dev/null || true)"
[[ -n "$PIDS" ]] && kill $PIDS 2>/dev/null || true
fi
sleep 0.2
cleanup() {
if [[ -n "$SERVER_PID" ]] && kill -0 "$SERVER_PID" 2>/dev/null; then
kill "$SERVER_PID" 2>/dev/null || true