Guard ccomp and INI context staging paths
This commit is contained in:
@@ -4675,6 +4675,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
function assertInterpIniContextNgcStaging(name, files, plan) {
|
||||
const stagedNgcFiles = plan.files
|
||||
.filter((file) => file.sourceRel.endsWith(".ngc"))
|
||||
.map((file) => file.wasmPath.replace(`/work/browser-interp/${name}/`, ""))
|
||||
.sort();
|
||||
if (stagedNgcFiles.join(",") !== files.join(",")) {
|
||||
throw new Error(`browser_interp_${name}_staging_manifest: list drift`);
|
||||
}
|
||||
}
|
||||
|
||||
async function writeInterpRegressionFiles(interp, name, files) {
|
||||
const sourceDir = `../../vendor/linuxcnc/tests/interp/${name}`;
|
||||
const wasmDir = `/work/browser-interp/${name}`;
|
||||
@@ -6713,12 +6723,7 @@
|
||||
if (insideCornersNgcFiles.length !== 1 || new Set(insideCornersNgcFiles).size !== insideCornersNgcFiles.length) {
|
||||
throw new Error("browser_interp_inside_corners_fixture_coverage: list drift");
|
||||
}
|
||||
const insideCornersStagedNgcFiles = [
|
||||
insideCornersPath,
|
||||
].map((path) => path.replace("/work/browser-interp/inside-corners/", ""));
|
||||
if (insideCornersStagedNgcFiles.join(",") !== insideCornersNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_inside_corners_staging_manifest: list drift");
|
||||
}
|
||||
assertInterpRegressionFileStaging("inside-corners", "test.ngc", insideCornersPath);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_inside_corners",
|
||||
interp.runFile(insideCornersPath),
|
||||
@@ -6752,12 +6757,11 @@
|
||||
if (inverseTimeWithCompNgcFiles.length !== 1 || new Set(inverseTimeWithCompNgcFiles).size !== inverseTimeWithCompNgcFiles.length) {
|
||||
throw new Error("browser_interp_inverse_time_with_comp_fixture_coverage: list drift");
|
||||
}
|
||||
const inverseTimeWithCompStagedNgcFiles = [
|
||||
assertInterpRegressionFileStaging(
|
||||
"inverse-time-with-comp",
|
||||
"inverse.ngc",
|
||||
inverseTimeWithCompPath,
|
||||
].map((path) => path.replace("/work/browser-interp/inverse-time-with-comp/", ""));
|
||||
if (inverseTimeWithCompStagedNgcFiles.join(",") !== inverseTimeWithCompNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_inverse_time_with_comp_staging_manifest: list drift");
|
||||
}
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_inverse_time_with_comp",
|
||||
interp.runFile(inverseTimeWithCompPath),
|
||||
@@ -7413,14 +7417,7 @@
|
||||
if (iniparamNgcFiles.length !== 1 || new Set(iniparamNgcFiles).size !== iniparamNgcFiles.length) {
|
||||
throw new Error("browser_interp_iniparam_fixture_coverage: list drift");
|
||||
}
|
||||
const iniparamStagedNgcFiles = iniparamPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/iniparam/", ""))
|
||||
.sort();
|
||||
if (iniparamStagedNgcFiles.join(",") !== iniparamNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_iniparam_staging_manifest: list drift");
|
||||
}
|
||||
assertInterpIniContextNgcStaging("iniparam", iniparamNgcFiles, iniparamPlan);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_iniparam",
|
||||
interp.runFileWithIniContinueOnError(
|
||||
@@ -7453,14 +7450,11 @@
|
||||
if (iniparamFailassignNgcFiles.length !== 1 || new Set(iniparamFailassignNgcFiles).size !== iniparamFailassignNgcFiles.length) {
|
||||
throw new Error("browser_interp_iniparam_failassign_fixture_coverage: list drift");
|
||||
}
|
||||
const iniparamFailassignStagedNgcFiles = iniparamFailassignPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/iniparam-failassign/", ""))
|
||||
.sort();
|
||||
if (iniparamFailassignStagedNgcFiles.join(",") !== iniparamFailassignNgcFiles.join(",")) {
|
||||
throw new Error("browser_interp_iniparam_failassign_staging_manifest: list drift");
|
||||
}
|
||||
assertInterpIniContextNgcStaging(
|
||||
"iniparam-failassign",
|
||||
iniparamFailassignNgcFiles,
|
||||
iniparamFailassignPlan,
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"browser_interp_iniparam_failassign",
|
||||
interp.runFileWithIni(
|
||||
|
||||
@@ -284,6 +284,17 @@ function assertInterpRegressionFileStaging(name, filename, wasmPath) {
|
||||
);
|
||||
}
|
||||
|
||||
function assertInterpIniContextNgcStaging(name, files, plan) {
|
||||
assert.deepEqual(
|
||||
plan.files
|
||||
.filter((file) => file.sourceRel.endsWith(".ngc"))
|
||||
.map((file) => file.wasmPath.replace(`/work/interp/${name}/`, ""))
|
||||
.sort(),
|
||||
files,
|
||||
`interp ${name} staging manifest drift`,
|
||||
);
|
||||
}
|
||||
|
||||
function writeInterpRegressionFiles(name, files) {
|
||||
const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/interp", name);
|
||||
const wasmDir = `/work/interp/${name}`;
|
||||
@@ -1683,13 +1694,7 @@ assert.deepEqual(
|
||||
interpRegressionNgcFilesRecursive("inside-corners"),
|
||||
"interp inside-corners fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
[
|
||||
insideCornersPath,
|
||||
],
|
||||
insideCornersNgcFiles.map((file) => `/work/interp/inside-corners/${file}`),
|
||||
"interp inside-corners staging manifest drift",
|
||||
);
|
||||
assertInterpRegressionFileStaging("inside-corners", "test.ngc", insideCornersPath);
|
||||
verifyExpectedOutput(
|
||||
"interp_inside_corners_wasm",
|
||||
interp.runFile(insideCornersPath),
|
||||
@@ -1724,13 +1729,7 @@ assert.deepEqual(
|
||||
interpRegressionNgcFilesRecursive("inverse-time-with-comp"),
|
||||
"interp inverse-time-with-comp fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
[
|
||||
inverseTimeWithCompPath,
|
||||
],
|
||||
inverseTimeWithCompNgcFiles.map((file) => `/work/interp/inverse-time-with-comp/${file}`),
|
||||
"interp inverse-time-with-comp staging manifest drift",
|
||||
);
|
||||
assertInterpRegressionFileStaging("inverse-time-with-comp", "inverse.ngc", inverseTimeWithCompPath);
|
||||
verifyExpectedOutput(
|
||||
"interp_inverse_time_with_comp_wasm",
|
||||
interp.runFile(inverseTimeWithCompPath),
|
||||
@@ -2388,15 +2387,7 @@ assert.deepEqual(
|
||||
interpRegressionNgcFilesRecursive("iniparam"),
|
||||
"interp iniparam fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
iniparamPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/iniparam/", ""))
|
||||
.sort(),
|
||||
iniparamNgcFiles,
|
||||
"interp iniparam staging manifest drift",
|
||||
);
|
||||
assertInterpIniContextNgcStaging("iniparam", iniparamNgcFiles, iniparamPlan);
|
||||
verifyExpectedOutput(
|
||||
"interp_iniparam_wasm",
|
||||
interp.runFileWithIniContinueOnError(
|
||||
@@ -2428,14 +2419,10 @@ assert.deepEqual(
|
||||
interpRegressionNgcFilesRecursive("iniparam-failassign"),
|
||||
"interp iniparam-failassign fixture coverage drift",
|
||||
);
|
||||
assert.deepEqual(
|
||||
iniparamFailassignPlan.files
|
||||
.map((file) => file.sourceRel)
|
||||
.filter((sourceRel) => sourceRel.endsWith(".ngc"))
|
||||
.map((sourceRel) => sourceRel.replace("tests/interp/iniparam-failassign/", ""))
|
||||
.sort(),
|
||||
assertInterpIniContextNgcStaging(
|
||||
"iniparam-failassign",
|
||||
iniparamFailassignNgcFiles,
|
||||
"interp iniparam-failassign staging manifest drift",
|
||||
iniparamFailassignPlan,
|
||||
);
|
||||
verifyExpectedOutput(
|
||||
"interp_iniparam_failassign_wasm",
|
||||
|
||||
Reference in New Issue
Block a user