mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:40:42 +00:00
fix(test): skip heavy-check lock for scoped tooling runs
This commit is contained in:
@@ -754,6 +754,21 @@ export function createVitestRunSpecs(args, params = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
export function shouldAcquireLocalHeavyCheckLock(runSpecs, env = process.env) {
|
||||
if (env.OPENCLAW_TEST_PROJECTS_FORCE_LOCK === "1") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !(
|
||||
env.OPENCLAW_TEST_PROJECTS_SERIAL === "1" &&
|
||||
runSpecs.length === 1 &&
|
||||
runSpecs[0]?.config === TOOLING_VITEST_CONFIG &&
|
||||
runSpecs[0]?.watchMode === false &&
|
||||
Array.isArray(runSpecs[0]?.includePatterns) &&
|
||||
runSpecs[0].includePatterns.length > 0
|
||||
);
|
||||
}
|
||||
|
||||
export function writeVitestIncludeFile(filePath, includePatterns) {
|
||||
fs.writeFileSync(filePath, `${JSON.stringify(includePatterns, null, 2)}\n`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user