T: review round 1 fix runner argv, filter cache, and the test builtin

This commit is contained in:
ari committed 2026-10-19 22:37:08 -04:00
1 parent 40cf1073f4
commit 6dade6239d
6 files changed
+562 -93

No files matched your search

+3 -3
View File
@@ -18,12 +18,12 @@ 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`, exposed as the `test` script inside `devenv shell`. `test --help` lists the underlying cargo and nix commands.
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.
```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 --tests (plain, tls, integration, binary_smoke, peers)
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
@@ -32,7 +32,7 @@ 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 and the help text 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/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.
## Conventions