Skip to content

Commit 0830527

Browse files
committed
test(cli): show warm test stderr on windows
1 parent 4e0a733 commit 0830527

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/checkfast-measure.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-latest, macos-latest, windows-latest]
15+
os: [windows-latest]
1616
env:
1717
HYPERFRAMES_NO_TELEMETRY: "1"
1818
DO_NOT_TRACK: "1"
@@ -46,7 +46,7 @@ jobs:
4646
run: bun run build
4747
- name: Measure cold vs warm, then the warm process tests
4848
shell: bash
49-
run: bash .github/checkfast/measure.sh
49+
run: cd packages/cli && npx vitest run src/warmCheck.process.test.ts --maxWorkers=1 -t "prints what a cold" 2>&1 | tail -150
5050
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5151
if: always()
5252
with:

‎packages/cli/src/warmCheck.process.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function run(args: string[], env: Record<string, string>) {
6262
});
6363
let stdout = "";
6464
child.stdout.on("data", (data: Buffer) => (stdout += data.toString()));
65-
child.stderr.on("data", () => {});
65+
const tag = args[2] ?? args[0]!.split(/[\\/]/).pop();
66+
child.stderr.on("data", (d: Buffer) => process.stderr.write(`[${Date.now()} ${tag} pid=${child.pid}] ${d}`));
67+
child.once("close", (code) => process.stderr.write(`[${Date.now()} ${tag}] closed ${code}\n`));
6668
const done = new Promise<number | null>((resolve) => child.once("close", resolve));
6769
onTestFinished(() => stopTestProcesses(child, []));
6870
return { child, done, stdout: () => stdout };

0 commit comments

Comments
 (0)