Guard ccomp staging paths
This commit is contained in:
44
text6.txt
44
text6.txt
@@ -662,3 +662,47 @@ wasm-port/tests/host/verify_host_smokes.sh
|
||||
之外的 remaining direct-file 单项,或已经有 fixed list 的分组;若涉及工具表/INI,
|
||||
只按现有 `writeInterpRegressionFiles(...)` 或 staging helper 输出做路径 guard。
|
||||
继续避免 blocked runtime promotion、browser full inventory 扩面和 JS CNC 语义实现。
|
||||
|
||||
十七、2026-06-13 继续执行记录:ccomp staging path guard
|
||||
|
||||
本批按“已有 staging helper 的 fixture staged path guard”推进,完成现有
|
||||
Node/browser ccomp coverage 使用的 4 个目录:
|
||||
|
||||
- `ccomp/lathe-comp`
|
||||
- `ccomp/mill-g90g91g92`
|
||||
- `ccomp/mill-line-arc-entry`
|
||||
- `ccomp/mill-zchanges`
|
||||
|
||||
完成内容:
|
||||
|
||||
- Node 侧新增 `ccompRegressionFiles` fixed manifest:`test.ngc`、`test.tbl`;
|
||||
- Node 侧新增 `assertCcompRegressionStaging(...)`,与 upstream vendored
|
||||
`.ngc/.tbl` fixture 精确对账;
|
||||
- Node 侧检查 `writeCcompRegressionFiles(...)` 目标 staged path 与 fixed manifest
|
||||
一致;
|
||||
- browser 侧新增同名 fixed manifest 与 staged path guard;
|
||||
- browser 侧检查 staged path 去掉 `/work/browser-ccomp/<name>/` 前缀后与 fixed
|
||||
manifest 一致;
|
||||
- 仅校验文件清单与 staging 路径,不改变 cutter-comp、工具表或 INI 语义;
|
||||
- browser 仍不依赖目录枚举。
|
||||
|
||||
已运行验证:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||||
wasm-port/tools/verify_vendor_sync.sh
|
||||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||||
wasm-port/tests/host/verify_host_smokes.sh
|
||||
```
|
||||
|
||||
结果:全部通过。
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续选择已有 Node/browser coverage 且 staging helper/file list 明确的 fixture。
|
||||
优先候选:继续扫描剩余 `write*RegressionFiles(...)` helper 输出,或挑选短小单文件
|
||||
direct-file case。仍不要推进 blocked runtime promotion、browser full inventory
|
||||
扩面或 JS CNC 语义实现。
|
||||
|
||||
@@ -4687,6 +4687,21 @@
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
const ccompRegressionFiles = [
|
||||
"test.ngc",
|
||||
"test.tbl",
|
||||
];
|
||||
|
||||
function assertCcompRegressionStaging(name, wasmDir) {
|
||||
if (ccompRegressionFiles.length !== 2 || new Set(ccompRegressionFiles).size !== ccompRegressionFiles.length) {
|
||||
throw new Error("browser_interp_ccomp_fixture_coverage: list drift");
|
||||
}
|
||||
const ccompStagedRelativeFiles = ccompRegressionFiles.map((file) => `${wasmDir}/${file}`.replace(`/work/browser-ccomp/${name}/`, ""));
|
||||
if (ccompStagedRelativeFiles.join(",") !== ccompRegressionFiles.join(",")) {
|
||||
throw new Error(`browser_interp_ccomp_${name}_staging_manifest: list drift`);
|
||||
}
|
||||
}
|
||||
|
||||
async function writeG10RegressionFiles(interp, name, files) {
|
||||
const sourceDir = `../../vendor/linuxcnc/tests/interp/g10/${name}`;
|
||||
const wasmDir = `/work/browser-interp/g10/${name}`;
|
||||
@@ -6765,6 +6780,7 @@
|
||||
);
|
||||
|
||||
const ccompLatheCompDir = await writeCcompRegressionFiles(interp, "lathe-comp");
|
||||
assertCcompRegressionStaging("lathe-comp", ccompLatheCompDir);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_ccomp_lathe_comp",
|
||||
interp.runFileWithIni(
|
||||
@@ -6789,6 +6805,7 @@
|
||||
interp,
|
||||
"mill-g90g91g92",
|
||||
);
|
||||
assertCcompRegressionStaging("mill-g90g91g92", ccompMillG90G91G92Dir);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_ccomp_mill_g90g91g92",
|
||||
interp.runFileWithIni(
|
||||
@@ -6812,6 +6829,7 @@
|
||||
interp,
|
||||
"mill-line-arc-entry",
|
||||
);
|
||||
assertCcompRegressionStaging("mill-line-arc-entry", ccompMillLineArcEntryDir);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_ccomp_mill_line_arc_entry",
|
||||
interp.runFileWithIni(
|
||||
@@ -6832,6 +6850,7 @@
|
||||
);
|
||||
|
||||
const ccompMillZchangesDir = await writeCcompRegressionFiles(interp, "mill-zchanges");
|
||||
assertCcompRegressionStaging("mill-zchanges", ccompMillZchangesDir);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_ccomp_mill_zchanges",
|
||||
interp.runFileWithIni(
|
||||
|
||||
@@ -315,6 +315,27 @@ function writeCcompRegressionFiles(name) {
|
||||
return wasmDir;
|
||||
}
|
||||
|
||||
const ccompRegressionFiles = [
|
||||
"test.ngc",
|
||||
"test.tbl",
|
||||
];
|
||||
|
||||
function assertCcompRegressionStaging(name, wasmDir) {
|
||||
const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/ccomp", name);
|
||||
assert.deepEqual(
|
||||
readdirSync(sourceDir)
|
||||
.filter((filename) => filename.endsWith(".ngc") || filename.endsWith(".tbl"))
|
||||
.sort(),
|
||||
ccompRegressionFiles,
|
||||
`interp ccomp ${name} fixture coverage drift`,
|
||||
);
|
||||
assert.deepEqual(
|
||||
ccompRegressionFiles.map((file) => `${wasmDir}/${file}`),
|
||||
ccompRegressionFiles.map((file) => `/work/ccomp/${name}/${file}`),
|
||||
`interp ccomp ${name} staging manifest drift`,
|
||||
);
|
||||
}
|
||||
|
||||
function writeG10RegressionFiles(name, files) {
|
||||
const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/interp/g10", name);
|
||||
const wasmDir = `/work/interp/g10/${name}`;
|
||||
@@ -1716,6 +1737,7 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const ccompLatheCompDir = writeCcompRegressionFiles("lathe-comp");
|
||||
assertCcompRegressionStaging("lathe-comp", ccompLatheCompDir);
|
||||
verifyExpectedOutput(
|
||||
"interp_ccomp_lathe_comp_wasm",
|
||||
interp.runFileWithIni(`${ccompLatheCompDir}/test.ngc`, `${ccompLatheCompDir}/test.ini`),
|
||||
@@ -1734,6 +1756,7 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const ccompMillG90G91G92Dir = writeCcompRegressionFiles("mill-g90g91g92");
|
||||
assertCcompRegressionStaging("mill-g90g91g92", ccompMillG90G91G92Dir);
|
||||
verifyExpectedOutput(
|
||||
"interp_ccomp_mill_g90g91g92_wasm",
|
||||
interp.runFileWithIni(
|
||||
@@ -1754,6 +1777,7 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const ccompMillLineArcEntryDir = writeCcompRegressionFiles("mill-line-arc-entry");
|
||||
assertCcompRegressionStaging("mill-line-arc-entry", ccompMillLineArcEntryDir);
|
||||
verifyExpectedOutput(
|
||||
"interp_ccomp_mill_line_arc_entry_wasm",
|
||||
interp.runFileWithIni(
|
||||
@@ -1774,6 +1798,7 @@ verifyExpectedOutput(
|
||||
);
|
||||
|
||||
const ccompMillZchangesDir = writeCcompRegressionFiles("mill-zchanges");
|
||||
assertCcompRegressionStaging("mill-zchanges", ccompMillZchangesDir);
|
||||
verifyExpectedOutput(
|
||||
"interp_ccomp_mill_zchanges_wasm",
|
||||
interp.runFileWithIni(`${ccompMillZchangesDir}/test.ngc`, `${ccompMillZchangesDir}/test.ini`),
|
||||
|
||||
Reference in New Issue
Block a user