Guard staged prefix stripping
This commit is contained in:
@@ -297,11 +297,21 @@ function assertInterpRegressionFileStaging(name, filename, wasmPath) {
|
||||
);
|
||||
}
|
||||
|
||||
function stripInterpIniContextStagingPrefix(name, wasmPath) {
|
||||
const prefix = `/work/interp/${name}/`;
|
||||
assert.equal(
|
||||
wasmPath.startsWith(prefix),
|
||||
true,
|
||||
`interp ${name} staging prefix drift: ${wasmPath}`,
|
||||
);
|
||||
return wasmPath.slice(prefix.length);
|
||||
}
|
||||
|
||||
function assertInterpIniContextNgcStaging(name, files, plan) {
|
||||
assert.deepEqual(
|
||||
plan.files
|
||||
.filter((file) => file.sourceRel.endsWith(".ngc"))
|
||||
.map((file) => file.wasmPath.replace(`/work/interp/${name}/`, ""))
|
||||
.map((file) => stripInterpIniContextStagingPrefix(name, file.wasmPath))
|
||||
.sort(),
|
||||
files,
|
||||
`interp ${name} staging manifest drift`,
|
||||
|
||||
Reference in New Issue
Block a user