test(ci): provide proc metadata for Linux hopper fixtures
This commit is contained in:
parent
d5b5441a3a
commit
b3a60b6b03
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -74,7 +74,11 @@ it
|
|||
if (alternateMode) {
|
||||
const processEntry = join(procRoot, String(pid));
|
||||
await mkdir(processEntry);
|
||||
await symlink(`/proc/${String(pid)}/exe`, join(processEntry, "exe"));
|
||||
for (const name of ["cmdline", "comm", "exe"])
|
||||
await symlink(
|
||||
`/proc/${String(pid)}/${name}`,
|
||||
join(processEntry, name),
|
||||
);
|
||||
}
|
||||
const { stdout: coordinates } = await execFileAsync("ps", [
|
||||
"-p",
|
||||
|
|
|
|||
Loading…
Reference in New Issue