| 41 | } |
| 42 | |
| 43 | async function runKimiWithEnv(args, env) { |
| 44 | try { |
| 45 | const { stdout, stderr } = await execFileAsync(executablePath, args, { |
| 46 | cwd: appRoot, |
| 47 | env: { ...process.env, ...env }, |
| 48 | maxBuffer: 1024 * 1024 * 16, |
| 49 | }); |
| 50 | return `${stdout}${stderr}`; |
| 51 | } catch (error) { |
| 52 | const detail = [error.stdout?.trim(), error.stderr?.trim(), error.message] |
| 53 | .filter(Boolean) |
| 54 | .join('\n'); |
| 55 | fail(`Native smoke failed: ${executablePath} ${args.join(' ')}\n${detail}`); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | function assertIncludes(output, expected, command) { |
| 60 | if (!output.includes(expected)) { |