8e82286287
- run-tests.sh: starts pipeline services, runs test-unit.py, stops services on failure, leaves running on success - synth-diagnostic is the single gate for pipeline startup - deploy: stop pipeline → restart prometheus → start synth-diagnostic (synth-diagnostic starts pipeline on success)
25 lines
759 B
Bash
25 lines
759 B
Bash
#!/bin/bash
|
|
# run-tests.sh — start services, run tests, clean up on failure
|
|
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"
|
|
else
|
|
echo "[diag] Tests FAILED (exit $exit_code) — stopping pipeline services"
|
|
sudo systemctl stop midi-bridge pd-synth-onboard led-matrix-viz
|
|
fi
|
|
|
|
exit $exit_code |