Artifact 3195259ae28c28520d2063d0ce846e4ced040367133db99c533d01334712f849:
- File docs/dev/testing.md — part of check-in [cef29b55cb] at 2026-11-21 16:04:45 on branch docs-help — pic help [TOPIC] and /help TOPIC: the manual and reference compiled in (src/manual.inc, built, not committed); pic --help is a 27-line synopsis; help.sh tests both and checks the synopsis against docs/reference/cli.md; doc fixes: Alt+P picks a model, 36 RPC commands, more differences from Pi (user: dmestas, size: 1824) [annotate] [blame] [check-ins using] [more...]
Testing
make test-pic # crash, tool, provider, session, TUI and unit suites; ASan/UBSan and release builds
make test-docs # the reference against the code, the README budget, links
make bench-pic # compare timings with bench/baselines/<OS>-<arch>.tsv
make test-pic runs every suite in parallel, one job per core (JOBS=1 for the serial order); each
script keeps its output in build/pic/logs and prints it only when it fails. Tests never touch the
real ~/.pic: they run with a private HOME and PIC_MODEL_CATALOG=offline. make install-pic
runs the whole suite before it installs.
CI runs the same suite on every check-in and gates trunk. Landing has the details.
Changes are also run under Fil-C, where any memory error is a crash
(tools/remote/). Fil-C says how to run it.
Compilers
The build uses CC (default cc) and compiles with -Werror; it is warning-clean under clang and
gcc (make CC=gcc-16 pic). gcc's -Wformat-truncation, which clang does not have, is off: a
clipped error or display string is the intended outcome there.
Fuzzing
make fuzz-decode, fuzz-http, fuzz-chat and fuzz-responses need an LLVM clang with libFuzzer;
FUZZ_SECONDS bounds a run. CI runs each for 30 seconds when the runner has one.
Generated files
src/changelog.inc is built from CHANGELOG.md by tools/changelog-inc.sh, and src/manual.inc
from docs/manual and docs/reference by tools/manual-inc.sh; neither is committed.
test/pic/help.sh checks that pic help TOPIC prints each file exactly and that pic --help stays
within 40 lines and 100 columns. The key table in docs/reference/keys.md is generated from
src/tui/keymap.c by sh test/pic/docs.sh --keys, and make test-docs fails when they differ.