mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
Smoke Test Framework
This directory contains the shell-based smoke test framework for the current repository.
Layout
run.sh: suite entrypointlib/common.sh: shared shell helperssuites/config_repo.sh: generic suite implementation for the current config repositorycases/rime_ice/input_cases.tsv: data-driven input cases
Current Flow
- uses local
rime_deployerandrime_api_consolefromPATHwhen available - otherwise downloads the public Linux CLI bundle when
RIME_CLI_URLis set - deploys the current repository with
rime_deployer --build - runs
rime_api_console - verifies basic pinyin commit and a stable Lua-driven Unicode commit
Environment Variables
RIME_CLI_URL: optional public CLI bundle URLRIME_CONFIG_ROOT: optional repository root overrideSMOKE_ALLOW_DESTRUCTIVE=1: required for local runs because the smoke suite removes${RIME_CONFIG_ROOT:-repo}/buildand${RIME_CONFIG_ROOT:-repo}/*.userdb
Destructive Cleanup
The smoke suite removes the following paths under RIME_CONFIG_ROOT before deployment:
build/*.userdb/
This cleanup is allowed automatically in CI. Local runs must opt in explicitly:
SMOKE_ALLOW_DESTRUCTIVE=1 ./others/script/smoke/run.sh
Extending
Add more rows to cases/rime_ice/input_cases.tsv.
The current tab-separated case format is:
case_idschema_idkey_sequenceexpected_text
expected_text also supports:
@today:<date format>, for example@today:%Y-%m-%d@regex:<pattern>, matched against the normalized stdout log
rime_api_console is used as the default runner because it is more reliable than rime_console for smoke tests that reuse an already deployed workspace.