bc2c0b8cfd
systemd/ (target/data.mount/firstboot/machineid/power/settings/shell + dbus-policy + journald/zram/oomd): ordering data.mount->firstboot->machineid->dbus->power+settings->shell; Requires+After firstboot; OOMScoreAdjust. lima/shturman.yaml (vz, Ubuntu ARM64, /data loopback, провижининг). tests/e2e/run.sh (каркас приёмки). justfile: vm-up/down/reset/shell, run, e2e, shell-frame. Валидация — часть 2 (поднятие Lima). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Alexander <akotenev2003@gmail.com>
92 lines
3.1 KiB
Makefile
92 lines
3.1 KiB
Makefile
# Штурман — единые dev-команды (расширяется по планам реализации).
|
|
set shell := ["bash", "-uc"]
|
|
|
|
# список целей
|
|
default:
|
|
@just --list
|
|
|
|
# собрать весь воркспейс
|
|
build:
|
|
cargo build --workspace
|
|
|
|
# тесты (unit + integration)
|
|
test:
|
|
cargo test --workspace
|
|
|
|
# линт: формат + clippy (warnings = ошибки)
|
|
lint:
|
|
cargo fmt --all --check
|
|
cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
# лицензии + advisories
|
|
deny:
|
|
cargo deny check
|
|
|
|
# интеграционные тесты на session-шине (нужен dbus: brew install dbus / в Lima)
|
|
test-integration:
|
|
dbus-run-session -- cargo test --workspace -- --ignored
|
|
|
|
# полный локальный гейт
|
|
ci: lint test deny
|
|
|
|
# --- плагины (F02/F03) ---
|
|
|
|
# валидировать манифест плагина
|
|
validate-manifest path:
|
|
cargo run -q -p shturman-manifest-validator -- {{path}}
|
|
|
|
# сгенерировать каркас плагина в plugins/<name> и проверить валидатором
|
|
new-plugin name:
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
dest="plugins/{{name}}"
|
|
[ -e "$dest" ] && { echo "уже существует: $dest"; exit 1; }
|
|
mkdir -p "$dest"
|
|
cp -R templates/plugin/. "$dest/"
|
|
for f in $(find "$dest" -type f); do
|
|
tmp=$(mktemp); sed "s/__NAME__/{{name}}/g" "$f" > "$tmp" && mv "$tmp" "$f"
|
|
done
|
|
echo "создан плагин: $dest"
|
|
cargo run -q -p shturman-manifest-validator -- "$dest/manifest.yaml"
|
|
|
|
# dev-запуск плагина (каркас; полноценно — с App-Host, v3)
|
|
plugin-dev-run path:
|
|
@echo "plugin-dev-run {{path}}: нужен App-Host (приходит в v3). Пока — валидация манифеста:"
|
|
cargo run -q -p shturman-manifest-validator -- {{path}}/manifest.yaml
|
|
|
|
# Vehicle Simulator (плейсхолдер; домен E, v2)
|
|
sim:
|
|
@echo "Vehicle Simulator — v2 (домен E): vcan + ELM327-emu; каркас в sim/."
|
|
|
|
# --- Lima-VM (часть 2 Плана 5: нужен limactl — brew install lima) ---
|
|
|
|
# поднять dev-VM (создание + провижининг)
|
|
vm-up:
|
|
limactl start --name=shturman lima/shturman.yaml
|
|
|
|
# остановить VM
|
|
vm-down:
|
|
limactl stop shturman
|
|
|
|
# шелл в VM
|
|
vm-shell:
|
|
limactl shell shturman
|
|
|
|
# пересоздать VM «с нуля» (сброс — ничего на хосте не ломаем)
|
|
vm-reset:
|
|
-limactl stop shturman
|
|
-limactl delete shturman
|
|
limactl start --name=shturman lima/shturman.yaml
|
|
|
|
# собрать + развернуть + поднять target в VM (boot → сервисы → кадр)
|
|
run:
|
|
limactl shell shturman -- bash -lc 'cd /shturman && bash tests/e2e/run.sh'
|
|
|
|
# сквозной E2E в VM (приёмка v0.1/v0.6 + шагающий скелет)
|
|
e2e:
|
|
limactl shell shturman -- bash -lc 'cd /shturman && bash tests/e2e/run.sh'
|
|
|
|
# ручная проверка кадра: на хосте — окно Slint (headless PNG-screenshot — часть 2/Lima)
|
|
shell-frame:
|
|
cargo run -p shturman-shell
|