补充浏览器随机刀库保存覆盖
结论:浏览器解释器 smoke 现在验证 random-toolchanger 场景下 vendored LinuxCNC tooldata_save 的 C ABI 返回结果,再检查 OPFS 写回文本。
This commit is contained in:
@@ -141,6 +141,8 @@ through vendored `Interp::restore_parameters()` and `Interp::save_parameters()`,
|
|||||||
and directly checks missing-file success plus out-of-order parameter-file
|
and directly checks missing-file success plus out-of-order parameter-file
|
||||||
rejection through the same LinuxCNC `restore_parameters()` C ABI,
|
rejection through the same LinuxCNC `restore_parameters()` C ABI,
|
||||||
to load/save LinuxCNC tool tables through vendored `tooldata_common.cc`, and
|
to load/save LinuxCNC tool tables through vendored `tooldata_common.cc`, and
|
||||||
|
to check the random-toolchanger `tooldata_save()` result before OPFS text
|
||||||
|
writeback,
|
||||||
to reject invalid INI-derived parameter/tool-table file names through the OPFS
|
to reject invalid INI-derived parameter/tool-table file names through the OPFS
|
||||||
path model after the names are parsed by the LinuxCNC-backed INI WASM SDK. It
|
path model after the names are parsed by the LinuxCNC-backed INI WASM SDK. It
|
||||||
also verifies that explicit session parameter/tool-table file-name options
|
also verifies that explicit session parameter/tool-table file-name options
|
||||||
@@ -202,7 +204,7 @@ The validation fails if:
|
|||||||
| `tests/wasm/node/verify_interp_wasm.sh` | Validates the initial interpreter-core WASM module can be built from vendored LinuxCNC interpreter source, loaded through the interpreter JS SDK, run the first fixture group through `Interp::execute()` and selected file fixtures through `Interp::open()`/`read()`/`execute()`, match the native canonical event plus required state readback fixtures, and run parameter-file restore/save through vendored LinuxCNC `Interp::restore_parameters()` and `Interp::save_parameters()`. |
|
| `tests/wasm/node/verify_interp_wasm.sh` | Validates the initial interpreter-core WASM module can be built from vendored LinuxCNC interpreter source, loaded through the interpreter JS SDK, run the first fixture group through `Interp::execute()` and selected file fixtures through `Interp::open()`/`read()`/`execute()`, match the native canonical event plus required state readback fixtures, and run parameter-file restore/save through vendored LinuxCNC `Interp::restore_parameters()` and `Interp::save_parameters()`. |
|
||||||
| `tests/opfs/node/verify_file_service.sh` | Validates the host-owned OPFS text-file adapter, path model, session snapshot store including custom filenames and envelope/path rejection paths, machine file store, G-code text store including filename rejection paths, OPFS-to-WASM parameter/tool-table bridges, and grouped machine-session loading without moving file persistence, parameter semantics, or tool-table semantics into the WASM core. |
|
| `tests/opfs/node/verify_file_service.sh` | Validates the host-owned OPFS text-file adapter, path model, session snapshot store including custom filenames and envelope/path rejection paths, machine file store, G-code text store including filename rejection paths, OPFS-to-WASM parameter/tool-table bridges, and grouped machine-session loading without moving file persistence, parameter semantics, or tool-table semantics into the WASM core. |
|
||||||
| `tests/browser/verify_ini_panel_browser.sh` | Validates the INI SDK, INI/interpreter WASM module loading, LinuxCNC-backed INI machine-session file-name string lookup, OPFS text-file round trip, generic session snapshot round trip plus custom filename and envelope/path rejection paths, machine file text round trip, G-code text round trip plus filename rejection paths, and the INI panel UI's machine-session load with default OPFS parameter/tool-table file mapping, G-code run, and canonical-event display paths in a real browser runtime. |
|
| `tests/browser/verify_ini_panel_browser.sh` | Validates the INI SDK, INI/interpreter WASM module loading, LinuxCNC-backed INI machine-session file-name string lookup, OPFS text-file round trip, generic session snapshot round trip plus custom filename and envelope/path rejection paths, machine file text round trip, G-code text round trip plus filename rejection paths, and the INI panel UI's machine-session load with default OPFS parameter/tool-table file mapping, G-code run, and canonical-event display paths in a real browser runtime. |
|
||||||
| `tests/browser/verify_interp_browser.sh` | Validates the interpreter-core WASM module loads through the interpreter JS SDK in a real browser runtime and runs selected positive and negative canonical fixtures through vendored LinuxCNC `Interp::execute()` plus `Interp::open()`/`read()`/`execute()` via the exported C ABI, including OPFS-backed parameter-file restore/save and tool-table load/save through vendored LinuxCNC source. |
|
| `tests/browser/verify_interp_browser.sh` | Validates the interpreter-core WASM module loads through the interpreter JS SDK in a real browser runtime and runs selected positive and negative canonical fixtures through vendored LinuxCNC `Interp::execute()` plus `Interp::open()`/`read()`/`execute()` via the exported C ABI, including OPFS-backed parameter-file restore/save and non-random/random tool-table load/save through vendored LinuxCNC source. |
|
||||||
| `tests/host/verify_host_smokes.sh` | Runs the current host-side Node, WASM interpreter-core, OPFS, and browser smoke validation with shared WASM builds. |
|
| `tests/host/verify_host_smokes.sh` | Runs the current host-side Node, WASM interpreter-core, OPFS, and browser smoke validation with shared WASM builds. |
|
||||||
|
|
||||||
## Fixture Coverage
|
## Fixture Coverage
|
||||||
@@ -277,7 +279,8 @@ by vendored `save_parameters()`. It also covers LinuxCNC tool-table
|
|||||||
load/save behavior through vendored `tooldata_common.cc`, including the
|
load/save behavior through vendored `tooldata_common.cc`, including the
|
||||||
non-random and random-toolchanger `tooldata_init()` branches, with the SDK
|
non-random and random-toolchanger `tooldata_init()` branches, with the SDK
|
||||||
only copying text into the Emscripten filesystem and calling the exported C
|
only copying text into the Emscripten filesystem and calling the exported C
|
||||||
ABI.
|
ABI; the browser smoke checks the random-toolchanger `tooldata_save()` C ABI
|
||||||
|
result before OPFS persistence writes the saved table text back.
|
||||||
OPFS validation covers the JavaScript host-boundary adapter, the INI browser
|
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,
|
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
|
the raw canonical-event display fed directly by LinuxCNC interpreter WASM
|
||||||
|
|||||||
@@ -396,11 +396,20 @@
|
|||||||
"tool_index_for_tool_2=7",
|
"tool_index_for_tool_2=7",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
await saveMachineToolTableToOpfs(
|
const savedRandomToolTable = await saveMachineToolTableToOpfs(
|
||||||
interp,
|
interp,
|
||||||
"browser-random-toolchanger",
|
"browser-random-toolchanger",
|
||||||
{ wasmPath: "/work/browser-random-tool.tbl" },
|
{ wasmPath: "/work/browser-random-tool.tbl" },
|
||||||
);
|
);
|
||||||
|
verifyExpectedOutput(
|
||||||
|
"opfs_save_random_tool_table",
|
||||||
|
savedRandomToolTable.result,
|
||||||
|
[
|
||||||
|
"tooldata_save=0",
|
||||||
|
"tool_pocket_7.toolno=2",
|
||||||
|
"tool_pocket_9.toolno=5",
|
||||||
|
].join("\n"),
|
||||||
|
);
|
||||||
const savedRandomMachineFiles = await loadMachineTextFiles(
|
const savedRandomMachineFiles = await loadMachineTextFiles(
|
||||||
"browser-random-toolchanger",
|
"browser-random-toolchanger",
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user