Guard ccomp per-file staging paths

This commit is contained in:
2026-06-13 12:53:55 +08:00
parent 08e10c7b5a
commit 5175444fe9
3 changed files with 82 additions and 18 deletions

View File

@@ -4730,13 +4730,14 @@
"test.tbl",
];
function assertCcompRegressionStaging(name, wasmDir) {
function assertCcompRegressionFilesStaging(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`);
for (const file of ccompRegressionFiles) {
if (`${wasmDir}/${file}` !== `/work/browser-ccomp/${name}/${file}`) {
throw new Error(`browser_interp_ccomp_${name}_${file}_staging_manifest: list drift`);
}
}
}
@@ -6791,7 +6792,7 @@
);
const ccompLatheCompDir = await writeCcompRegressionFiles(interp, "lathe-comp");
assertCcompRegressionStaging("lathe-comp", ccompLatheCompDir);
assertCcompRegressionFilesStaging("lathe-comp", ccompLatheCompDir);
verifyExpectedOutput(
"browser_interp_ccomp_lathe_comp",
interp.runFileWithIni(
@@ -6816,7 +6817,7 @@
interp,
"mill-g90g91g92",
);
assertCcompRegressionStaging("mill-g90g91g92", ccompMillG90G91G92Dir);
assertCcompRegressionFilesStaging("mill-g90g91g92", ccompMillG90G91G92Dir);
verifyExpectedOutput(
"browser_interp_ccomp_mill_g90g91g92",
interp.runFileWithIni(
@@ -6840,7 +6841,7 @@
interp,
"mill-line-arc-entry",
);
assertCcompRegressionStaging("mill-line-arc-entry", ccompMillLineArcEntryDir);
assertCcompRegressionFilesStaging("mill-line-arc-entry", ccompMillLineArcEntryDir);
verifyExpectedOutput(
"browser_interp_ccomp_mill_line_arc_entry",
interp.runFileWithIni(
@@ -6861,7 +6862,7 @@
);
const ccompMillZchangesDir = await writeCcompRegressionFiles(interp, "mill-zchanges");
assertCcompRegressionStaging("mill-zchanges", ccompMillZchangesDir);
assertCcompRegressionFilesStaging("mill-zchanges", ccompMillZchangesDir);
verifyExpectedOutput(
"browser_interp_ccomp_mill_zchanges",
interp.runFileWithIni(