mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:50:43 +00:00
test: remove stale runtime deps lock smoke
This commit is contained in:
@@ -551,7 +551,6 @@ async function runWatchdog(options) {
|
||||
}
|
||||
await retryRpcCall("health", {}, options);
|
||||
assertNoPostReadyRuntimeDepsWork(options.logPath, readyIndex);
|
||||
assertNoRuntimeDepsLocks();
|
||||
await assertNoPackageManagerChildren(options.child.pid);
|
||||
}
|
||||
|
||||
@@ -572,47 +571,6 @@ function assertNoPostReadyRuntimeDepsWork(logPath, readyIndex) {
|
||||
}
|
||||
}
|
||||
|
||||
function assertNoRuntimeDepsLocks() {
|
||||
const roots = [path.join(process.cwd(), "dist", "extensions")];
|
||||
for (const root of roots) {
|
||||
if (!fs.existsSync(root)) {
|
||||
continue;
|
||||
}
|
||||
const locks = findDirs(root, ".openclaw-runtime-deps.lock", 8);
|
||||
if (locks.length > 0) {
|
||||
throw new Error(`runtime dependency lock still exists: ${locks.join(", ")}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function findDirs(root, basename, maxDepth) {
|
||||
const results = [];
|
||||
const visit = (dir, depth) => {
|
||||
if (depth > maxDepth) {
|
||||
return;
|
||||
}
|
||||
let entries;
|
||||
try {
|
||||
entries = fs.readdirSync(dir, { withFileTypes: true });
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
for (const entry of entries) {
|
||||
if (!entry.isDirectory()) {
|
||||
continue;
|
||||
}
|
||||
const full = path.join(dir, entry.name);
|
||||
if (entry.name === basename) {
|
||||
results.push(full);
|
||||
continue;
|
||||
}
|
||||
visit(full, depth + 1);
|
||||
}
|
||||
};
|
||||
visit(root, 0);
|
||||
return results;
|
||||
}
|
||||
|
||||
async function assertNoPackageManagerChildren(pid) {
|
||||
if (!pid || process.platform === "win32") {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user