Some checks failed
rust-ci / checks (push) Has been cancelled
- Rust workspace: 7 library crates, icenetd CLI, icenet-city (Slint GUI) - Sim: fix false Delivered after a route cut, derive traffic class from payload size, per-link airtime slots (link capacity, queueing) - Docs: single docs/STATUS.md for all figures, remove v0.2/egui leftovers, drop unimplemented seed claims, uncheck store-and-forward - License: LGPL-3.0-or-later (LICENSE, LICENSES/GPL-3.0.txt)
1.9 KiB
1.9 KiB
Tests / CI
В Rust тесты лежат только в отдельной папке каждого крейта:
crates/<name>/tests/*.rs и apps/<name>/tests/*.rs. Inline #[cfg(test)] в src запрещён.
cd workspace
python3 tools/check_layout.py
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo doc --workspace --no-deps
Пирамида
core: классы и логические ID.wire: roundtrip + отказ на malformed frame / oversize.routing: slow-only route for Text / forbidden for Bulk / oversized Text treated as Bulk / link-down.guard: deny unknown service, cap payload, no fake authentication.sim: node failure, in-flight state, queued retry, no falseDeliveredafter a cut, link capacity (tests/capacity/).city: GUI smoke test вручную (позднее snapshot/interaction integration tests).
Приёмка
- Все новые тесты воспроизводимы без сети/радио.
- Каждый алгоритм не нуждается в реальном
sleep; используется sim clock. - При дефекте добавить regression test отдельно от production module.
- Маркеры
TODO/unimplemented!()не прятать в ветки реальных пакетов.
Что проверено и сколько тестов проходит — в STATUS.
Быстрые и полные проверки
cd workspace
sh tools/check_all.sh # core routing/simulator, без Slint-сборки
sh tools/check_all.sh --full # также Slint GUI и все integration tests
cargo fmt --all форматирует в том числе GUI crate; .slint не проверяется
rustfmt и проверяется компилятором Slint в build.rs.