|
@@ -12,7 +12,7 @@ import { join } from 'node:path'
|
|
|
import { fileURLToPath } from 'node:url'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
import { spawnSync } from 'node:child_process'
|
|
import { spawnSync } from 'node:child_process'
|
|
|
import { describe, expect, it } from 'vitest'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
-import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke'
|
|
|
|
|
|
|
+import { runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke'
|
|
|
import { resolvePwshPath } from '@deepseek-ai/dsh-pwsh-local'
|
|
import { resolvePwshPath } from '@deepseek-ai/dsh-pwsh-local'
|
|
|
|
|
|
|
|
// The probe follows the executor's own resolution (Program Files installs on
|
|
// The probe follows the executor's own resolution (Program Files installs on
|
|
@@ -37,6 +37,11 @@ interface PwshLoaderReport {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => {
|
|
describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => {
|
|
|
|
|
+ // Self-hosted Windows runners reach ~40s for this smoke under the full
|
|
|
|
|
+ // coverage load (measured on the 192-thread CI pool), against the
|
|
|
|
|
+ // 30s default process deadline. Give the subprocess headroom so the
|
|
|
|
|
+ // assembled boot completes instead of being SIGKILLed mid-load.
|
|
|
|
|
+ const processTimeoutMs = 90_000
|
|
|
it('registers the pwsh surface and renders real foreground and background results', async () => {
|
|
it('registers the pwsh surface and renders real foreground and background results', async () => {
|
|
|
let report: PwshLoaderReport | undefined
|
|
let report: PwshLoaderReport | undefined
|
|
|
const { stderr } = await runLoaderSmoke({
|
|
const { stderr } = await runLoaderSmoke({
|
|
@@ -46,9 +51,7 @@ describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => {
|
|
|
libBinScript: driver,
|
|
libBinScript: driver,
|
|
|
configPath,
|
|
configPath,
|
|
|
tsconfigPath: repoTsconfig,
|
|
tsconfigPath: repoTsconfig,
|
|
|
- // The self-hosted Windows pool can take roughly 40 seconds to boot this
|
|
|
|
|
- // real Loader composition under the full CI load.
|
|
|
|
|
- processTimeoutMs: 90_000,
|
|
|
|
|
|
|
+ processTimeoutMs,
|
|
|
inspect: async (cwd) => {
|
|
inspect: async (cwd) => {
|
|
|
report = JSON.parse(await readFile(join(cwd, 'pwsh-loader-report.json'), 'utf8')) as PwshLoaderReport
|
|
report = JSON.parse(await readFile(join(cwd, 'pwsh-loader-report.json'), 'utf8')) as PwshLoaderReport
|
|
|
},
|
|
},
|
|
@@ -62,5 +65,7 @@ describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => {
|
|
|
expect(report?.foregroundText).toBe('loader-ok\n')
|
|
expect(report?.foregroundText).toBe('loader-ok\n')
|
|
|
expect(report?.backgroundText).toContain('loader-bg-ok')
|
|
expect(report?.backgroundText).toContain('loader-bg-ok')
|
|
|
expect(report?.backgroundText).toContain('[status: completed, exit code: 0]')
|
|
expect(report?.backgroundText).toContain('[status: completed, exit code: 0]')
|
|
|
- }, LOADER_SMOKE_TEST_TIMEOUT_MS + 75_000)
|
|
|
|
|
|
|
+ // 15s of vitest headroom past the subprocess deadline, mirroring
|
|
|
|
|
+ // LOADER_SMOKE_TEST_TIMEOUT_MS's margin over its process window.
|
|
|
|
|
+ }, processTimeoutMs + 15_000)
|
|
|
})
|
|
})
|