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:
2026-06-24 02:59:14 -07:00
parent 9aead397fd
commit 1876d8cd42
3 changed files with 5 additions and 15 deletions
+3 -10
View File
@@ -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