T: rename runner to dev-test
This commit is contained in:
1 parent
6dade6239d
commit
b476ac2b0c
6 files changed
+331
-219
No files matched your search
@@ -18,21 +18,21 @@ Canonical guidance for AI coding agents in this repo (no CLAUDE.md; this file is
|
||||
|
||||
Enter the toolchain with `devenv shell` (Rust, pkg-config, libsystemd, nushell, otelcol). Without it you need a Rust toolchain, `pkg-config` and the libsystemd dev files.
|
||||
|
||||
All checks go through one runner, `dev/test.nu`. `devenv shell -- test …` runs the devenv script on PATH. In an interactive bash or zsh, `test` is the shell builtin, so `test unit` exits 0 without running the suite; use `devenv shell -- test unit` or `nu dev/test.nu unit`. An interactive `devenv shell` installs a bash function that runs known subcommands and leaves `test -f` to the builtin. zsh users add `source <(nu dev/test.nu completions zsh)` to `.zshrc` after `compinit`. `nu dev/test.nu --help` lists the underlying cargo and nix commands.
|
||||
All checks go through one runner, `dev/dev-test.nu`. `devenv shell -- dev-test …` runs the devenv script on PATH, and the same command works in an interactive shell. zsh users add `source <(nu dev/dev-test.nu completions zsh)` to `.zshrc` after `compinit`. An interactive `devenv shell` installs bash completion. `nu dev/dev-test.nu --help` lists the underlying cargo and nix commands.
|
||||
|
||||
```sh
|
||||
devenv shell -- test lint # cargo fmt --check, clippy -D warnings, cargo tree -i openssl (empty)
|
||||
devenv shell -- test unit # cargo test --lib --bins
|
||||
devenv shell -- test integration [filter] [--nocapture] # cargo test --test '*' (plain, tls, integration, binary_smoke, peers)
|
||||
devenv shell -- test vm [vm|peers] # NixOS VM test (slow, needs /dev/kvm)
|
||||
devenv shell -- test all # lint, unit, integration; stops at the first failure
|
||||
devenv shell -- test ci # all plus the vm test
|
||||
devenv shell -- smoke # real binary smoke test (cargo test --test binary_smoke -- --nocapture)
|
||||
cargo build --release # target/release/slinuxm
|
||||
devenv shell -- dev-test lint # cargo fmt --check, clippy -D warnings, cargo tree -i openssl (empty)
|
||||
devenv shell -- dev-test unit # cargo test --lib --bins
|
||||
devenv shell -- dev-test integration [filter] [--nocapture] # cargo test --test '*' (plain, tls, integration, binary_smoke, peers)
|
||||
devenv shell -- dev-test vm [vm|peers] # NixOS VM test (slow, needs /dev/kvm)
|
||||
devenv shell -- dev-test all # lint, unit, integration; stops at the first failure
|
||||
devenv shell -- dev-test ci # all plus the vm test
|
||||
devenv shell -- smoke # real binary smoke test (cargo test --test binary_smoke -- --nocapture)
|
||||
cargo build --release # target/release/slinuxm
|
||||
nix build && nix flake check # package, module, VM test (slow; Nix changes only)
|
||||
```
|
||||
|
||||
`devenv up` runs a local OTLP collector (`dev/otelcol.yaml`). Do not run nix builds unless the task involves Nix files, and never while another agent is running the nix gate. When editing `dev/test.nu`, run `nu dev/test.nu self-check`; it fails if the command table, the subcommands, the help text, the cargo argv or the shell wrapper drift apart.
|
||||
`devenv up` runs a local OTLP collector (`dev/otelcol.yaml`). Do not run nix builds unless the task involves Nix files, and never while another agent is running the nix gate. When editing `dev/dev-test.nu`, run `nu dev/dev-test.nu self-check`; it fails if the command table, the subcommands, the help text, the cargo argv or the shell completion drift apart.
|
||||
|
||||
## Conventions
|
||||
|
||||
@@ -63,7 +63,7 @@ nix build && nix flake check # package, module, VM te
|
||||
|
||||
## Definition of done
|
||||
|
||||
1. `devenv shell -- test all` (fmt, clippy, unit and integration tests) passes; that is `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test`.
|
||||
1. `devenv shell -- dev-test all` (fmt, clippy, unit and integration tests) passes; that is `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test`.
|
||||
2. New behaviour has tests (fakes for handlers and tools; `tests/` for end to end).
|
||||
3. Docs updated: `README.md`, `config.example.toml`, `ARCHITECTURE.md` as relevant.
|
||||
4. `TODO.md` updated; any deferred work is in the Backlog with a reason.
|
||||
|
||||
Reference in new issue
Block a user