cmd oxl test
oxl test [paths] [filters]run tests (III.9)
Флаги
usage: oxl test [paths] [flags]
paths packages, modules or files (default: .)
--kind unit,integ,... test kinds (default: unit,integ,contract)
-f, --filter <regex> select by `module::name`
--exact <name> exactly this test (`module::name` or bare name)
-t, --tag a,b / !a only tests with one of the tags / without a tag
--skip <regex> exclude by name
--failed only tests that failed in the previous run
--fail-fast stop at the first failure
--list show the selected tests without running them
--repeat N run the selection N times
--codegen-units N codegen units of the test binary (default: automatic; OXL_CODEGEN_UNITS); build threads: OXL_JOBS
--linker l auto|lld|bfd|gold|default|<path> (OXL_LD; default auto: lld when installed)
--seed N run `sim` tests for this one seed (reproduces a failure; implies --kind sim)
--seeds a..b | N override the `seeds` range of `sim` tests (inclusive; N = 1..N)
-j, --parallel N tests run in parallel (default: cores)
--timeout d limit per test (500ms, 30s, 2m; default 60s)
--format pretty|json|jsonl|junit report format; jsonl streams one JSON event per line (plan, start, output, result, done; docs/ide-protocol.md)
--profile dev|test|prod build profile (default: test; prod when only bench tests run)
--bench-baseline <file> compare bench results with a previous `--format json` report
--bench-threshold <pct> allowed slowdown against the baseline (default 5)
--bench-time d measuring time per benchmark (default 1s)
--fuzz-runs N generated inputs per fuzz test (default 256)
--fuzz-time d time budget per fuzz test (default 10s); --seed N sets the fuzz seed
--update-snapshots rewrite the snapshots of assert_snapshot (snapshots/)
--changed [ref] tests affected by changes against a VCS reference (default HEAD)
--coverage [--html] line / branch / error-variant coverage (--html: .oxl/coverage/index.html)
--graph write the call graph of a failed integ/sim test (.oxl/graph/)
--debug[=print|dap|lldb] run ONE selected test under the debugger (III.9): print the lldb command and the VS Code
launch configuration (default), serve DAP on stdin/stdout (dap), or start lldb (lldb)Коды завершения
0 success, 1 program error or failed tests, 2 bad arguments, 3 compilation error, 78 configuration error
См. также
- ffi-demo
- hello
- notes-orm
- bank-saga
- shop
- streams
- testing-demo
- wordcount
- Паттерны тестов
- Benchmarks
- Line coverage (TZ 3.5)
- Fuzzing (TZ 3.5 / 5.2)
- Deterministic simulation (test sim, [С §18.4])
- Отладка из редактора
- VS Code
- Привет, мир и первый пакет
- Начало работы
- Шаг 9. Модули и пакеты
- Шаг 10. Тесты
- Тесты
- Параллельная сборка