test
Run the clice test suites, on a box unless a local run is truly necessary; also how to test on Windows. Optional args = suite (unit | cases | all, default all) build type (Debug | RelWithDebInfo, default RelWithDebInfo) and the box id the build ran on. Runs in a forked context; only a digest returns.
- License 许可
- Apache-2.0
- 所属仓库
- clice-io/clice
- 最近更新
- 2026-11-15
- Stars
- ★ 1.4k
- Forks
- 89
01 前言 Front Matter
- name
- test
- context
- fork
- description
- Run the clice test suites, on a box unless a local run is truly necessary; also how to test on Windows. Optional args = suite (unit | cases | all, default all) build type (Debug | RelWithDebInfo, default RelWithDebInfo) and the box id the build ran on. Runs in a forked context; only a digest returns.
02 资源文件 3
- 参考文档references/course-book.md3.6 KB
- 参考文档references/lemida-watch.md16.8 KB
- 参考文档references/library-refs.md21.4 KB
03 SKILL.md 正文
Run the requested suites (default: all) against the requested build type (default RelWithDebInfo).
Where it runs
On the box that built clice (the build skill; the caller passes its id), not on this machine unless truly necessary; the tools' own tests need no build and run here. A box this skill leases because the caller passed none is reported with its id, like the build skill's, and never downed. Run the suites as CI does, in the test-run environment: box run $id 'pixi run -e test-run test RelWithDebInfo'.
Windows: build on a linux box, run on a windows box, as CI does. A windows box builds nothing (no Bazel cache, only test-run).
lin=$(box up clice-io/clice) # the linux box also restores CI's Windows cache
win=$(box up clice-io/clice --os windows) # arm64: --os windows-arm, aarch64-w64-mingw32 below
box push $lin && box push $win
box run $lin 'pixi run build RelWithDebInfo -- --platforms=@xclang//platforms:x86_64-w64-mingw32'
box cp $lin $win build/RelWithDebInfo/bin/bin build/RelWithDebInfo/bin/lib --exclude '*.runfiles'
box run $win 'pixi run -e test-run unit-test RelWithDebInfo'
The copy is a few hundred MB (the debug info), a few minutes through the two tunnels.
Commands
- Unit tests:
pixi run -e test-run unit-test [type] - Cases:
pixi run -e test-run cases-test [type] - Both:
pixi run -e test-run test [type] - The tools' own tests, which need no build:
pixi run npm test -w tools
Filtering specific tests:
- Unit:
pixi run -e test-run unit-test [type] -- --test-filter=SuiteName.CaseName(alsoSuiteName.*) - Cases:
CLICE_CASES=<path prefix> pixi run -e test-run cases-test [type], e.g.CLICE_CASES=hover/orCLICE_CASES=hover/templates/06_template_forms; the "Running" section oftests/README.mdlists the rest.
The compat suite (pixi run compat-test) and the editors' end-to-end tests (pixi run -e editor editor-test) need build systems and editors installed; run them only when the caller names them.
This skill runs and reports — nothing else. Never fix code or tests from here, never set UPDATE_SNAPSHOTS. Fixing happens in the main conversation with full context.
Report back, per suite: pass/fail and counts. For each failure: the test name (a case's is <topic>/<subtopic>/<case> > <test>), the assertion message or snap.toml diff excerpt (trimmed), and the exact filter command to reproduce it.
04 同仓库更多 Skills
write-tests
Read before writing or modifying anything under tests/ or unittests/, or the tools' own tests — the case workflow, unit tests, hard rules and known pitfalls.
upgrade-llvm
Read before upgrading xclang/LLVM (arg = the xclang version, e.g. 23.1.2.1), touching MODULE.bazel, .bazelrc, BUILD.bazel or bazel/, or regenerating modules/ — after a library bump, or when clice needs a header or macro it does not export.
triage
Use when asked to triage issues — classifies untriaged issues with codex, validates the labels, and returns proposed labels plus an activity digest. Read-only; runs in a forked context.
translate-docs
Read before translating, reviewing or editing any docs/zh page — clice's glossary and page conventions, on top of the shared translation rules of clice-io/docs.
resolve-comments
Use in each watch round of an open PR — pulls its unresolved review threads, fixes them in the worktree, resolves them, and returns a compact summary.
release
Read before any release work — instant builds, nightlies, stable tags, publishing, release workflows — or symbolizing a user's crash log.