feat: expand cross-platform investigation workflows

This commit is contained in:
morluto
2026-07-20 08:08:39 +00:00
parent b537ebfa34
commit dffc81c865
672 changed files with 13013 additions and 2302 deletions
+12 -2
View File
@@ -52,8 +52,16 @@ class FixtureLauncher implements GhidraLauncher {
readonly endpointPaths: string[] = [];
readonly tokens: string[] = [];
readonly processes: ChildProcess[] = [];
readonly launched: Promise<void>;
readonly #resolveLaunched: () => void;
constructor(readonly mode: FixtureMode = "success") {}
constructor(readonly mode: FixtureMode = "success") {
let resolveLaunched = (): void => undefined;
this.launched = new Promise<void>((resolve) => {
resolveLaunched = resolve;
});
this.#resolveLaunched = resolveLaunched;
}
async launch(session: GhidraLaunchSession) {
this.runtimeRoots.push(session.runtimeRoot);
@@ -77,6 +85,7 @@ class FixtureLauncher implements GhidraLauncher {
{ stdio: ["ignore", "pipe", "pipe"] },
);
this.processes.push(process_);
this.#resolveLaunched();
return ok({
process: process_,
ownsProcessLifetime: true,
@@ -244,7 +253,8 @@ describe("GhidraClient", () => {
const client = clientFor(launcher, { startupTimeoutMs: 10_000 });
const controller = new AbortController();
const pending = client.start(controller.signal);
setTimeout(() => controller.abort(), 10);
await launcher.launched;
controller.abort();
const result = await pending;