mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:00:42 +00:00
fix(test): prevent Vitest shard stalls
This commit is contained in:
@@ -10,6 +10,8 @@ import {
|
||||
spawnWatchedVitestProcess,
|
||||
} from "./run-vitest.mjs";
|
||||
import {
|
||||
applyDefaultMultiSpecVitestCachePaths,
|
||||
applyDefaultVitestNoOutputTimeout,
|
||||
applyParallelVitestCachePaths,
|
||||
buildFullSuiteVitestRunPlans,
|
||||
createVitestRunSpecs,
|
||||
@@ -324,7 +326,7 @@ async function main() {
|
||||
const { targetArgs } = parseTestProjectsArgs(args, process.cwd());
|
||||
const changedTargetArgs =
|
||||
targetArgs.length === 0 ? resolveChangedTargetArgs(args, process.cwd()) : null;
|
||||
const runSpecs =
|
||||
const rawRunSpecs =
|
||||
targetArgs.length === 0 && changedTargetArgs === null
|
||||
? buildFullSuiteVitestRunPlans(args, process.cwd()).map((plan) => ({
|
||||
config: plan.config,
|
||||
@@ -348,6 +350,10 @@ async function main() {
|
||||
baseEnv: process.env,
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
const runSpecs = applyDefaultMultiSpecVitestCachePaths(
|
||||
applyDefaultVitestNoOutputTimeout(rawRunSpecs, { env: process.env }),
|
||||
{ cwd: process.cwd(), env: process.env },
|
||||
);
|
||||
|
||||
if (runSpecs.length === 0) {
|
||||
console.error("[test] no changed test targets; skipping Vitest.");
|
||||
|
||||
Reference in New Issue
Block a user