synth-diagnostic: just run tests, no service management
- run-tests.sh: no systemctl start/stop, just runs test-unit.py - synth-diagnostic.service: removed Before=, keeps After=prometheus-exporter (no deadlock risk since run-tests.sh doesn't start services) - justfile deploy: stop pipeline -> restart prometheus -> start synth-diagnostic -> restart pipeline Pipeline starts independently at boot (no After=synth-diagnostic). Diagnostic provides visibility at boot without blocking startup.
This commit is contained in:
@@ -107,7 +107,8 @@ deploy:
|
||||
echo '{{BOARD_PASS}}' | sudo -S systemctl stop midi-bridge pd-synth-onboard led-matrix-viz && \
|
||||
echo '{{BOARD_PASS}}' | sudo -S systemctl restart prometheus-exporter && \
|
||||
echo '{{BOARD_PASS}}' | sudo -S systemctl start synth-diagnostic && \
|
||||
echo '[OK] Deployed + restarted'"
|
||||
echo '{{BOARD_PASS}}' | sudo -S systemctl restart midi-bridge pd-synth-onboard led-matrix-viz && \
|
||||
echo '[OK] Deployed'"
|
||||
|
||||
# Start synth (onboard audio)
|
||||
synth-onboard:
|
||||
|
||||
+3
-10
@@ -1,25 +1,18 @@
|
||||
#!/bin/bash
|
||||
# run-tests.sh — start services, run tests, clean up on failure
|
||||
# run-tests.sh — run synth pipeline diagnostics
|
||||
set -euo pipefail
|
||||
|
||||
BOARD="${BOARD_HOST:-192.168.9.167}"
|
||||
cd /home/arduino/uno-q-audio-synth
|
||||
|
||||
echo "[diag] Starting pipeline services for diagnostics..."
|
||||
sudo systemctl start midi-bridge pd-synth-onboard led-matrix-viz
|
||||
|
||||
echo "[diag] Waiting 3s for services to settle..."
|
||||
sleep 3
|
||||
|
||||
echo "[diag] Running synth pipeline diagnostics against $BOARD..."
|
||||
python3 scripts/test-unit.py "$BOARD"
|
||||
exit_code=$?
|
||||
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
echo "[diag] All tests PASSED — pipeline healthy, leaving services running"
|
||||
echo "[diag] All tests PASSED"
|
||||
else
|
||||
echo "[diag] Tests FAILED (exit $exit_code) — stopping pipeline services"
|
||||
sudo systemctl stop midi-bridge pd-synth-onboard led-matrix-viz
|
||||
echo "[diag] Tests FAILED (exit $exit_code)"
|
||||
fi
|
||||
|
||||
exit $exit_code
|
||||
@@ -2,7 +2,6 @@
|
||||
Description=Synth pipeline diagnostic — runs unit tests at boot
|
||||
DefaultDependencies=no
|
||||
After=multi-user.target prometheus-exporter.service
|
||||
Before=midi-bridge.service pd-synth-onboard.service led-matrix-viz.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
@@ -10,9 +9,6 @@ ExecStart=/home/arduino/uno-q-audio-synth/scripts/run-tests.sh
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
RemainAfterExit=yes
|
||||
|
||||
# Don't let failures cascade — critical for headless boot
|
||||
# On failure: services won't start, board stays SSH-accessible
|
||||
FailureAction=none
|
||||
|
||||
[Install]
|
||||
|
||||
Reference in New Issue
Block a user