phase 2
This commit is contained in:
26
tests/integration/valve_control_loop.sh
Executable file
26
tests/integration/valve_control_loop.sh
Executable 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"
|
||||
Reference in New Issue
Block a user