Guard bad fixture staging paths

This commit is contained in:
2026-06-13 07:48:34 +08:00
parent 38246aa659
commit b2b3735de1
3 changed files with 51 additions and 0 deletions

View File

@@ -6995,8 +6995,10 @@
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);
verifyExpectedOutput(
`browser_interp_bad_${badFixture.name}`,
interp.runFile(badPath),
@@ -7010,6 +7012,10 @@
].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

@@ -1930,8 +1930,10 @@ 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);
verifyExpectedOutput(
`interp_bad_${badFixture.name}_wasm`,
interp.runFile(badPath),
@@ -1945,6 +1947,11 @@ 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 = [