Guard bad error direct-file staging

This commit is contained in:
2026-06-13 09:11:03 +08:00
parent 0ea8402247
commit be9fd7e17a
3 changed files with 44 additions and 13 deletions

View File

@@ -7077,10 +7077,9 @@
if (badInterpFixtures.length !== 21 || new Set(badInterpFixtures.map((fixture) => fixture.file)).size !== badInterpFixtures.length) {
throw new Error("browser_interp_bad_fixture_coverage: list drift");
}
const badStagedNgcFiles = [];
for (const badFixture of badInterpFixtures) {
const badPath = await writeInterpRegressionFile(interp, "bad", badFixture.file);
badStagedNgcFiles.push(badPath);
assertInterpRegressionFileStaging("bad", badFixture.file, badPath);
verifyExpectedOutput(
`browser_interp_bad_${badFixture.name}`,
interp.runFile(badPath),
@@ -7094,10 +7093,6 @@
].join("\n"),
);
}
const badStagedRelativeNgcFiles = badStagedNgcFiles.map((path) => path.replace("/work/browser-interp/bad/", ""));
if (badStagedRelativeNgcFiles.join(",") !== badInterpFixtures.map((fixture) => fixture.file).join(",")) {
throw new Error("browser_interp_bad_staging_manifest: list drift");
}
const g33_1Path = await writeInterpRegressionFile(interp, "g33.1", "g33.1.ngc");
const g33_1NgcFiles = [

View File

@@ -2042,10 +2042,9 @@ assert.deepEqual(
interpRegressionNgcFiles("bad"),
"interp bad fixture coverage drift",
);
const badStagedNgcFiles = [];
for (const badFixture of badInterpFixtures) {
const badPath = writeInterpRegressionFile("bad", badFixture.file);
badStagedNgcFiles.push(badPath);
assertInterpRegressionFileStaging("bad", badFixture.file, badPath);
verifyExpectedOutput(
`interp_bad_${badFixture.name}_wasm`,
interp.runFile(badPath),
@@ -2059,11 +2058,6 @@ for (const badFixture of badInterpFixtures) {
].join("\n"),
);
}
assert.deepEqual(
badStagedNgcFiles,
badInterpFixtures.map((fixture) => `/work/interp/bad/${fixture.file}`),
"interp bad staging manifest drift",
);
const g33_1Path = writeInterpRegressionFile("g33.1", "g33.1.ngc");
const g33_1NgcFiles = [