test: Testinstanz für den Engines-Leitstand auf srv04 (Skripte, Studio-Attrappe, Anleitung; #1198)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 09:53:33 +01:00
parent 33720e7c1a
commit 9b7d476c2b
6 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
# Läuft auf dem Entwicklungsrechner: kopiert das musl-Binary und die Testdateien nach srv04 und führt `prepare` aus.
# Startet nichts. Aufruf: scripts/srv04-leitstand-test/deploy.sh (HOST überschreibbar, Standard 192.168.12.4)
set -eu
HOST="${HOST:-192.168.12.4}"
HIER="$(cd "$(dirname "$0")" && pwd)"
BIN="$HIER/../../target/x86_64-unknown-linux-musl/release/nexus"
[ -x "$BIN" ] || { echo "Binary fehlt: $BIN (cargo build --release --target x86_64-unknown-linux-musl -p nexus)"; exit 1; }
# Ein noch laufendes Testbinary blockiert scp: vorher beenden.
ssh "$HOST" 'bash /tmp/nexus-test-0126/remote.sh stop >/dev/null 2>&1 || true; mkdir -p /tmp/nexus-test-0126/bin'
scp -q "$BIN" "$HOST:/tmp/nexus-test-0126/bin/nexus"
scp -q "$HIER/remote.sh" "$HIER/fake_studio.py" "$HIER/nexus-test-studio.service" "$HIER/config.toml.in" "$HOST:/tmp/nexus-test-0126/"
ssh "$HOST" 'chmod +x /tmp/nexus-test-0126/bin/nexus /tmp/nexus-test-0126/remote.sh /tmp/nexus-test-0126/fake_studio.py; /tmp/nexus-test-0126/bin/nexus version; bash /tmp/nexus-test-0126/remote.sh prepare'
echo "Fertig. Starten: ssh $HOST 'bash /tmp/nexus-test-0126/remote.sh start'"