补充浏览器 OPFS 默认路径覆盖
结论:浏览器解释器 smoke 现在验证真实 INI WASM 会话在缺失参数文件和刀具表文件名时回落到默认 OPFS 路径。
This commit is contained in:
@@ -135,7 +135,8 @@ 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
|
||||||
override INI-derived names before OPFS text is copied into the LinuxCNC-backed
|
override INI-derived names before OPFS text is copied into the LinuxCNC-backed
|
||||||
WASM filesystem.
|
WASM filesystem, and that absent INI file-name values use the default OPFS
|
||||||
|
parameter/tool-table paths in a real browser session.
|
||||||
|
|
||||||
The aggregate host smoke script builds the INI and interpreter-core WASM
|
The aggregate host smoke script builds the INI and interpreter-core WASM
|
||||||
artifacts once, then runs the Node WASM smokes, the Node OPFS mock smoke, and
|
artifacts once, then runs the Node WASM smokes, the Node OPFS mock smoke, and
|
||||||
@@ -279,7 +280,8 @@ session snapshot custom filename handling plus envelope/path rejection
|
|||||||
for unsupported format/version, wrong session id, and invalid snapshot
|
for unsupported format/version, wrong session id, and invalid snapshot
|
||||||
filenames, and a browser interpreter smoke that uses the same session bridge
|
filenames, and a browser interpreter smoke that uses the same session bridge
|
||||||
with real LinuxCNC INI WASM parsing before saving OPFS-backed parameter and
|
with real LinuxCNC INI WASM parsing before saving OPFS-backed parameter and
|
||||||
tool-table text through vendored LinuxCNC file APIs.
|
tool-table text through vendored LinuxCNC file APIs, including default OPFS
|
||||||
|
path fallback when INI file-name values are absent.
|
||||||
Full browser coverage, full SDK coverage, and richer machine-state validation
|
Full browser coverage, full SDK coverage, and richer machine-state validation
|
||||||
remain future work.
|
remain future work.
|
||||||
|
|
||||||
|
|||||||
@@ -307,6 +307,18 @@
|
|||||||
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
toolTableWasmPath: "/work/browser-random-tool.tbl",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
if (
|
||||||
|
loadedRandomSession.parameters.opfsPath !==
|
||||||
|
"linuxcnc/machines/browser-random-toolchanger/linuxcnc.var"
|
||||||
|
) {
|
||||||
|
throw new Error(`unexpected default parameter path: ${loadedRandomSession.parameters.opfsPath}`);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
loadedRandomSession.toolTable.opfsPath !==
|
||||||
|
"linuxcnc/machines/browser-random-toolchanger/tool.tbl"
|
||||||
|
) {
|
||||||
|
throw new Error(`unexpected default tool path: ${loadedRandomSession.toolTable.opfsPath}`);
|
||||||
|
}
|
||||||
verifyExpectedOutput(
|
verifyExpectedOutput(
|
||||||
"opfs_load_random_tool_table",
|
"opfs_load_random_tool_table",
|
||||||
loadedRandomSession.toolTable.result,
|
loadedRandomSession.toolTable.result,
|
||||||
|
|||||||
Reference in New Issue
Block a user