host_test
Compile and run native host unit tests without hardware, check both -O0 and -O3 for optimization-sensitive bugs, and isolate failing cases for diagnosis.
Instructions
Compile and run host (native) unit tests, no hardware needed / 主机单元测试.
Runs the project's driver (auto-detected Tests/run_host_tests.py) with a host C compiler. opt="both" runs -O0 and -O3 to catch optimization-sensitive bugs. On failure it re-runs per test with --only to name the failing cases. Use it standalone, or via workflow_pipeline as a pre-flash gate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>"
},
"name": "host_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| opt | No | both | |
| only | No | ||
| script | No | ||
| timeout_s | No | ||
| project_path | Yes | ||
| isolate_failures | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||