#!/usr/bin/env bash # Builds and runs all host unit tests. set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) cmake -S "$ROOT/test" -B "$ROOT/build/host" -G Ninja >/dev/null cmake --build "$ROOT/build/host" ctest --test-dir "$ROOT/build/host" --output-on-failure "$@" if python3 -c 'import pytest' 2>/dev/null; then python3 -m pytest "$ROOT/tools/mkimage/tests" "$ROOT/tools/station/tests" -q else echo "Hinweis: pytest fehlt - Python-Tests uebersprungen" >&2 fi "$ROOT/tools/station/tests/test_cli.sh" "$ROOT/tools/station/tests/test_setup_pi.sh"