Skip to content
pi-c Testing
Login

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. test/run-logged.sh sets PIC_TEST_PRIVATE_HOME, under which a pic whose HOME is the account's own refuses to start, and make test-docs fails for a test script that runs pic and never sets HOME. 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.