test: green the first Windows CI run + skip non-portable goldens on CI

Two fixes from the first real CI execution of these suites:
- windows_pty_test: the non-existent-executable test asserted errno==2
  (ERROR_FILE_NOT_FOUND), but Dart FFI doesn't reliably preserve GetLastError
  across the lookupFunction boundary (CI Windows returned 0). Assert the
  PtyException op instead. The ConPTY suite otherwise passed 21/22 on real
  Windows with no stall — supporting the accumulation (not single-run) freeze
  theory.
- golden_harness: platform goldens are font-render-dependent across machines
  (dev Fedora vs GitHub ubuntu-latest), so run them locally only and skip on CI
  (the CI env var). Goldens stay a local pre-merge check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 22:43:13 +02:00
co-authored by Claude Opus 4.8
parent 42d1d4acea
commit 04bb512cb7
2 changed files with 20 additions and 6 deletions
+7 -3
View File
@@ -101,8 +101,12 @@ void main() {
});
test('non-existent executable surfaces a PtyException at spawn time', () {
// CreateProcessW fails with ERROR_FILE_NOT_FOUND (2) — same code
// POSIX ENOENT happens to use, but asserted independently here.
// CreateProcessW fails (the file doesn't exist). The GetLastError code
// (ERROR_FILE_NOT_FOUND, 2) is intentionally NOT asserted: Dart FFI does
// not reliably preserve GetLastError across the lookupFunction boundary —
// CI Windows observed errno 0 here — so only the PtyException and the
// failing op are dependable. (Same reason the errno-based broken-pipe
// check in write() is best-effort; see T-424.)
expect(
() => WindowsPty.start(
executable: 'C:\\clide-no-such-binary-${DateTime.now().microsecondsSinceEpoch}.exe',
@@ -111,7 +115,7 @@ void main() {
rows: 24,
environment: {...Platform.environment},
),
throwsA(isA<PtyException>().having((e) => e.errno, 'errno', 2)),
throwsA(isA<PtyException>().having((e) => e.op, 'op', 'CreateProcessW')),
);
});
});