T: review round 1 fix runner argv, filter cache, and the test builtin
This commit is contained in:
1 parent
40cf1073f4
commit
6dade6239d
6 files changed
+562
-93
No files matched your search
@@ -178,11 +178,11 @@ ldd /usr/local/bin/slinuxm # libc, libm, libgcc_s, libsystemd and its depende
|
||||
|
||||
## Testing
|
||||
|
||||
Checks run through one runner, `dev/test.nu`, which is also the `test` script inside `devenv shell`. `test --help` lists every subcommand and the cargo or nix command behind it.
|
||||
Checks run through one runner, `dev/test.nu`. `devenv shell -- test …` runs it from any shell. In an interactive bash or zsh, `test` is the shell builtin, so `test unit` exits 0 without running the suite. `devenv shell -- test --help` lists every subcommand and the cargo or nix command behind it.
|
||||
|
||||
```sh
|
||||
devenv shell -- test unit # cargo test --lib --bins
|
||||
devenv shell -- test integration [filter] [--nocapture] # cargo test --tests
|
||||
devenv shell -- test integration [filter] [--nocapture] # cargo test --test '*' (integration targets only)
|
||||
devenv shell -- test lint # cargo fmt --check, clippy -D warnings, no openssl
|
||||
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
|
||||
@@ -198,4 +198,4 @@ The smoke test runs the real built `slinuxm` binary against a throwaway SQLite d
|
||||
devenv shell -- test all # fmt, clippy, unit and integration tests
|
||||
```
|
||||
|
||||
`test --help` shows the underlying commands (`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test`). In Nushell, `use dev/test.nu *` gives `test unit`, `test vm peers`, ... with tab completion; in zsh or bash, `source <(test completions zsh)` (or `bash`). The integration tests in `tests/` start the real router on an ephemeral port with fake sources. Design notes live in [ARCHITECTURE.md](ARCHITECTURE.md); work tracking in [TODO.md](TODO.md); extended docs in [docs/](docs/README.md).
|
||||
`devenv shell -- test --help` shows the underlying commands (`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test --lib --bins`, `cargo test --test '*'`). Nushell: `use dev/test.nu *` gives `test unit`, `test vm peers`, ... with tab completion. zsh users add `source <(nu dev/test.nu completions zsh)` to `.zshrc` after `compinit`. An interactive `devenv shell` installs the bash function; `test -f` stays the builtin. The integration tests in `tests/` start the real router on an ephemeral port with fake sources. Design notes live in [ARCHITECTURE.md](ARCHITECTURE.md); work tracking in [TODO.md](TODO.md); extended docs in [docs/](docs/README.md).
|
||||
Reference in new issue
Block a user