doc clean

This commit is contained in:
ari committed 2026-10-09 14:35:12 -04:00
1 parent c2a7f94821
commit 30427e3975
34 files changed
+1119 -1758

No files matched your search

+2 -13
View File
@@ -1,21 +1,10 @@
#!/usr/bin/env nu
#
# runtest — run the hermenix CLI test suite (nu/tests/).
#
# Requires the nutest module on NU_LIB_DIRS, which `nix develop`'s devShell
# sets up (that devShell also puts bin/ on PATH, so `runtest` works bare).
# Runs everything by default; pass a suite name to run just one file
# instead:
# runtest # everything
# runtest vm_test # only nu/tests/vm_test.nu
#
# To step through a single suite interactively instead of via nutest's
# runner, use runtest-debug.
# CLI tests (nu/tests/). Needs nutest on NU_LIB_DIRS (devShell).
use nutest
def main [
suite?: string # only run nu/tests/<suite>.nu, e.g. vm_test
suite?: string # e.g. vm_test → nu/tests/vm_test.nu
] {
let repo_root = ($env.FILE_PWD | path dirname)
let tests_path = ($repo_root | path join "nu" "tests")
+1 -12
View File
@@ -1,16 +1,5 @@
#!/usr/bin/env nu
#
# runtest-debug — interactively debug one CLI test file.
#
# Sources the given suite (e.g. `runtest-debug vm_test`) and drops you into
# an interactive nushell session with it loaded, instead of running it
# through nutest. Call any @test-tagged command by its full name to run
# just that test on its own and inspect what happens — nutest's runner
# captures output and runs tests concurrently, which gets in the way of
# stepping through a failure by hand.
#
# Test files don't need NU_LIB_DIRS/nutest themselves (only runtest's own
# runner does), so this works without the devShell's nutest wiring too.
# Load one suite into an interactive nu session (no nutest runner).
def main [suite: string] {
let repo_root = ($env.FILE_PWD | path dirname)
+2 -17
View File
@@ -1,23 +1,8 @@
#!/usr/bin/env nu
#
# runvmtest — build and run the guest-config VM tests. The mode-independent
# assertions (seeding, idempotency, account, SSH) are shared between the two
# tests via guest/vm-tests/common.nix; each test adds its own mode's
# networking checks.
#
# Plain pass/fail: the build fails if any testScript assertion fails. For
# stepping through it interactively instead, use runvmtest-debug.
#
# --impure is required because guest/common.nix reads
# /etc/hermenix/local.nix if present, same as the real hermes-guest-image
# build — a pre-existing property of common.nix, not something the tests
# introduce.
#
# Not run for you automatically: this needs a real build, which agents in
# this repo don't run (see GUIDELINES.md). You (or CI) run this by hand.
# Guest VM checks. --impure: guest/common.nix may read /etc/hermenix/local.nix.
def main [
suite?: string # which check to run: guest-vm-unbridged (default), guest-vm-bridged, or migrate-connections-vm
suite?: string # guest-vm-unbridged (default) | guest-vm-bridged | migrate-connections-vm
] {
let check = $suite | default "guest-vm-unbridged"
let attr = $".#checks.x86_64-linux.($check)"
+2 -15
View File
@@ -1,21 +1,8 @@
#!/usr/bin/env nu
#
# runvmtest-debug — build a guest-config VM test's interactive driver and
# drop into it, instead of just running it for pass/fail (see runvmtest).
#
# Opens a Python (ptpython) REPL with the test's node defined but not yet
# started. Useful from there:
# start_all()
# machine.wait_for_unit("multi-user.target")
# machine.shell_interact() # live shell inside the guest, over the console
# machine.succeed("...") # run any assertion from the guest-vm tests by hand
#
# Same --impure requirement as runvmtest, same reason (guest/common.nix
# reads /etc/hermenix/local.nix if present). Not run for you automatically
# — needs a real build, which agents in this repo don't run.
# Interactive driver REPL for a guest VM check. Same --impure as runvmtest.
def main [
suite?: string # which check to debug: guest-vm-unbridged (default), guest-vm-bridged, or migrate-connections-vm
suite?: string # guest-vm-unbridged (default) | guest-vm-bridged | migrate-connections-vm
] {
let check = $suite | default "guest-vm-unbridged"
let attr = $".#checks.x86_64-linux.($check).driverInteractive"