test(ci): provide proc metadata for Linux hopper fixtures

This commit is contained in:
morluto
2026-10-14 03:02:01 +08:00
parent d5b5441a3a
commit b3a60b6b03
2 changed files with 7 additions and 1 deletions
@@ -108,6 +108,7 @@ it.runIf(process.platform === "linux")(
const entry = join(${JSON.stringify(procRoot)}, String(process.pid));
await mkdir(entry);
await symlink("/proc/" + process.pid + "/cmdline", join(entry, "cmdline"));
await symlink("/proc/" + process.pid + "/comm", join(entry, "comm"));
await assertCleanLinuxHopperRuntime([], ${JSON.stringify(procRoot)});
console.log('clean');
`;
@@ -145,6 +146,7 @@ it.runIf(process.platform === "linux")(
const entry = join(${JSON.stringify(procRoot)}, String(process.pid));
await mkdir(entry);
await symlink("/proc/" + process.pid + "/cmdline", join(entry, "cmdline"));
await symlink("/proc/" + process.pid + "/comm", join(entry, "comm"));
const { assertCleanLinuxHopperRuntime } = await import(${JSON.stringify(observer)});
await assertCleanLinuxHopperRuntime([], ${JSON.stringify(procRoot)});
console.log('clean');