This commit is contained in:
flower_linux
2026-06-11 19:00:49 +08:00
parent 710a8c2bd3
commit 0cf0713dc5
73 changed files with 2297 additions and 95 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT"
fuser -k 9000/tcp 4840/tcp 2>/dev/null || true
sleep 1
./build/bin/softbus_daemon \
--config config/daemon_profile.json \
--point-table config/point_table.json \
--self-test > /tmp/valve_loop_daemon.log 2>&1 &
DAEMON_PID=$!
sleep 1
./build/bin/softbus_edge --config config/edge.json > /tmp/valve_loop_edge.log 2>&1 &
EDGE_PID=$!
sleep 8
kill "$DAEMON_PID" "$EDGE_PID" 2>/dev/null || true
fuser -k 9000/tcp 4840/tcp 2>/dev/null || true
grep -q "state=Succeeded" /tmp/valve_loop_daemon.log
grep -q "executedValue=60" /tmp/valve_loop_daemon.log
grep -q "ValveOpening value=60" /tmp/valve_loop_edge.log
echo "valve_control_loop: PASS"