mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
perf(test): trim fixture and serialization overhead in integration suites
This commit is contained in:
@@ -84,10 +84,11 @@ function runScript(
|
||||
stdout: string;
|
||||
stderr: string;
|
||||
} {
|
||||
const cacheKey = JSON.stringify({
|
||||
homeDir,
|
||||
extraEnv: Object.entries(extraEnv).toSorted(([a], [b]) => a.localeCompare(b)),
|
||||
});
|
||||
const extraEnvKey = Object.keys(extraEnv)
|
||||
.toSorted((a, b) => a.localeCompare(b))
|
||||
.map((key) => `${key}=${extraEnv[key] ?? ""}`)
|
||||
.join("\u0001");
|
||||
const cacheKey = `${homeDir}\u0000${extraEnvKey}`;
|
||||
const cached = runScriptCache.get(cacheKey);
|
||||
if (cached) {
|
||||
return cached;
|
||||
|
||||
Reference in New Issue
Block a user