Guard ccomp staging paths

This commit is contained in:
2026-06-13 08:06:19 +08:00
parent 10cae98a9e
commit 0588cec429
3 changed files with 88 additions and 0 deletions

View File

@@ -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(