fix(tests): make canonical run_tests.sh work on native Windows - #71591
fix(tests): make canonical run_tests.sh work on native Windows#71591monerostar wants to merge 1 commit into
Conversation
Overnight refresh (monerostar, native Win11 build 26200)Rebased locally onto current Live evidence the bug is still real on mainHermes install venv is native Windows layout only:
With Local tests on rebased treeNo code change in this comment — status only. |
Overnight status (monerostar, Win11 build 26200)Bug still real on current
|
|
Thanks for the native-Windows investigation and the concrete reproduction details. This is an automated hermes-sweeper review; the requested behavior is now implemented on
Closing as implemented on main. |
Summary
On native Windows + Git Bash,
scripts/run_tests.sh(the runner CONTRIBUTING requires before every PR) was unusable:env -i+ HOME only — CPython on Windows ignoresHOME;Path.home()raisesRuntimeError: Could not determine home directory([Bug]: run_tests.sh cannot run tests touching Path.home() on native Windows — env -i strips USERPROFILE #67385)✓crashes under legacy console code pages (UnicodeEncodeErrorcp1252)python.exeunderScripts/, notbin/What this PR does
Combines the approaches already validated in community PRs #67387 and #66496, plus #70813 location vars, after live verification on Win11:
Scripts/python.exeprobe (+ pytest import check, matching existingbin/gate)USERPROFILEHOMEDRIVEHOMEPATHSYSTEMROOTTEMPTMPLOCALAPPDATAAPPDATAPYTHONUTF8=1_make_stdio_glyph_safe()+ UTF-8 decode for pytest child outputtests/test_run_tests_parallel_stdio.py(cp1252)All Windows env vars are
:+-guarded — Linux/macOS env stays equivalent (no extra keys when unset).Live verification (monerostar, Win11)
Related
Test plan
pytest tests/test_run_tests_parallel_stdio.py→ 2 passedPath.home()under the newenv -iallowlistbash scripts/run_tests.sh tests/test_hermes_constants.pyon native Windows (symlink tests may still fail without Developer Mode — separate from this fix)Type