补充 INI 面板默认文件映射覆盖
结论:INI 面板会话加载日志现在展示默认 OPFS 参数文件和刀具表映射,浏览器 smoke 验证该 UI 入口仍通过 LinuxCNC-backed SDK/OPFS 边界加载。
This commit is contained in:
@@ -118,7 +118,9 @@ Chromium headless against a test page that imports the JS SDK, loads the INI
|
|||||||
WASM module, queries vendored LinuxCNC INI parsing through the SDK, and
|
WASM module, queries vendored LinuxCNC INI parsing through the SDK, and
|
||||||
performs an OPFS text-file, generic session snapshot, custom snapshot filename,
|
performs an OPFS text-file, generic session snapshot, custom snapshot filename,
|
||||||
invalid snapshot filename/envelope, machine file, G-code text round trip, and
|
invalid snapshot filename/envelope, machine file, G-code text round trip, and
|
||||||
G-code filename path-model rejection.
|
G-code filename path-model rejection. It also verifies that the INI panel UI
|
||||||
|
exposes the default OPFS parameter-file and tool-table mappings used when a
|
||||||
|
machine session is copied into the interpreter WASM filesystem.
|
||||||
|
|
||||||
The browser interpreter smoke script serves `wasm-port/` over localhost and
|
The browser interpreter smoke script serves `wasm-port/` over localhost and
|
||||||
runs Chromium headless against a test page that loads the interpreter-core
|
runs Chromium headless against a test page that loads the interpreter-core
|
||||||
@@ -191,7 +193,7 @@ The validation fails if:
|
|||||||
| `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded through the JS SDK in Node, and queried through the exported C ABI. |
|
| `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded through the JS SDK in Node, and queried through the exported C ABI. |
|
||||||
| `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, 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, 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, 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 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. |
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,9 @@ document.getElementById("load-session").addEventListener("click", async () => {
|
|||||||
[
|
[
|
||||||
"Loaded machine session into the interpreter WASM filesystem.",
|
"Loaded machine session into the interpreter WASM filesystem.",
|
||||||
`INI: ${loadedSession.ini.opfsPath} -> ${loadedSession.ini.wasmPath}`,
|
`INI: ${loadedSession.ini.opfsPath} -> ${loadedSession.ini.wasmPath}`,
|
||||||
|
`Parameter file: ${loadedSession.parameters.opfsPath} -> ${loadedSession.parameters.wasmPath}`,
|
||||||
`Parameters: ${loadedSession.parameters.result.trim()}`,
|
`Parameters: ${loadedSession.parameters.result.trim()}`,
|
||||||
|
`Tool table file: ${loadedSession.toolTable.opfsPath} -> ${loadedSession.toolTable.wasmPath}`,
|
||||||
`Tool table: ${loadedSession.toolTable.result.trim()}`,
|
`Tool table: ${loadedSession.toolTable.result.trim()}`,
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -269,6 +269,16 @@ JOINTS = 3
|
|||||||
if (!uiLog.includes("restore_parameters=0") || !uiLog.includes("tooldata_load=0")) {
|
if (!uiLog.includes("restore_parameters=0") || !uiLog.includes("tooldata_load=0")) {
|
||||||
throw new Error(`UI session log missing LinuxCNC load result: ${uiLog}`);
|
throw new Error(`UI session log missing LinuxCNC load result: ${uiLog}`);
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
!uiLog.includes(
|
||||||
|
"Parameter file: linuxcnc/machines/xyzab-tdr/linuxcnc.var -> /work/session-linuxcnc.var",
|
||||||
|
) ||
|
||||||
|
!uiLog.includes(
|
||||||
|
"Tool table file: linuxcnc/machines/xyzab-tdr/tool.tbl -> /work/session-tool.tbl",
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
throw new Error(`UI session log missing OPFS default file mapping: ${uiLog}`);
|
||||||
|
}
|
||||||
uiDocument.getElementById("run-gcode").click();
|
uiDocument.getElementById("run-gcode").click();
|
||||||
await waitFor(
|
await waitFor(
|
||||||
() => uiDocument.getElementById("log")?.textContent.includes("Ran G-code"),
|
() => uiDocument.getElementById("log")?.textContent.includes("Ran G-code"),
|
||||||
|
|||||||
Reference in New Issue
Block a user