Commit Graph

2 Commits

Author SHA1 Message Date
4ab5fdc5de tests: two Windows reds on main's check job (CI-MAIN-WINDOWS-TESTS)
test_gen_gdk_runtime_classes imported the POSIX-only resource module at the top, so the whole file failed to import on Windows. Import it guarded and skip the two failed-write tests that need RLIMIT_FSIZE.

test_make_game_plain_logs compared the child's getcwd() with the temp folder as strings; on the Windows runner the temp folder is an 8.3 short name (RUNNER~1) and getcwd() returns the long one. Compare with os.path.samefile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:17:28 +01:00
f85de7d953 gen_gdk_runtime_classes: write --out atomically
Write the generated JSON to a temporary file in the destination directory, then atomically replace the output. Remove the temporary file on write errors and preserve output permissions.

Before: with 128 synthetic classes and an existing 14-byte output, `bash -c 'trap "" XFSZ; ulimit -f 1; python3 -I tools/gen_gdk_runtime_classes.py /home/hampa/.hermes/profiles/mikuling/cache/scratch/gdk-atomic-repro/docs --out /home/hampa/.hermes/profiles/mikuling/cache/scratch/gdk-atomic-repro/out.json'` returned 1 (Errno 27, File too large); output grew to 1024 bytes (partial JSON).

After: the same command returned 1, left the 14-byte sentinel unchanged, and left no temporary file. Tests against upstream/main: 1 failed, 2 passed; against the fix: 3 passed.
2026-11-25 08:10:38 +01:00