按规划继续工作

结论:新增解释器初始化和同步的 WASM/浏览器验证,继续保持核心行为来自 vendored LinuxCNC。
This commit is contained in:
2026-06-08 11:21:05 +08:00
parent a8bc1f18cb
commit ec3d784f2b
8 changed files with 137 additions and 9 deletions

View File

@@ -87,7 +87,11 @@ interpreter harness. It loads the module in Node through
`runtime/sdk/src/index.js`, runs the first WASM interpreter fixture
group through `Interp::execute()`, and compares emitted canonical events plus
required LinuxCNC `_setup` state readback with the matching files in
`tests/fixtures/canon/`. It also writes selected G-code fixtures into the
`tests/fixtures/canon/`. It also calls vendored `Interp::init()` and
`Interp::synch()` through the WASM C ABI to validate the initialization
canonical boundary, metric/inch machine-unit status edge, and current/selected
tool slot status synchronization already covered by the native init harness.
It also writes selected G-code fixtures into the
Emscripten filesystem through the SDK and runs them through LinuxCNC
`Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the
file execution path. The same Node smoke writes LinuxCNC-format parameter
@@ -135,7 +139,10 @@ behavior in JavaScript, and verifies existing canonical fixtures through the
exported C ABI backed by vendored LinuxCNC `Interp::execute()` and
`Interp::open()`/`read()`/`execute()` paths, including the INI-aware
named-parameter file path and negative interpreter fixtures with expected
error text plus absent canonical motion output. It also uses real browser OPFS
error text plus absent canonical motion output. It also validates vendored
`Interp::init()` and `Interp::synch()` through the same SDK/C ABI path,
including initialization canonical events, metric/inch machine units, and tool
slot readback. It also uses real browser OPFS
storage plus the interpreter SDK to restore and save a LinuxCNC parameter file
through vendored `Interp::restore_parameters()` and `Interp::save_parameters()`,
and directly checks missing-file success plus out-of-order parameter-file
@@ -280,7 +287,11 @@ load/save behavior through vendored `tooldata_common.cc`, including the
non-random and random-toolchanger `tooldata_init()` branches, with the SDK
only copying text into the Emscripten filesystem and calling the exported C
ABI; the browser smoke checks the random-toolchanger `tooldata_save()` C ABI
result before OPFS persistence writes the saved table text back.
result before OPFS persistence writes the saved table text back. The same
Node WASM and browser interpreter smokes now validate the exported
`Interp::init()`/`Interp::synch()` probe for initialization canonical events,
metric/inch `emcStatus` machine-unit conversion, and current/selected tool
slot synchronization.
OPFS validation covers the JavaScript host-boundary adapter, the INI browser
smoke harness, the INI panel UI's machine-session load and G-code run buttons,
the raw canonical-event display fed directly by LinuxCNC interpreter WASM