tests: handle hosted Windows temp paths and warning colors #2209
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2217"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T05:35:49Z.
Two source-built Python fixtures fail in the full Windows 2025 CTest run when the temporary directory contains an 8.3 alias. The call-evidence test compares the printed canonical report path to an expected path containing the alias. The startup launcher passes the expanded cache path to the watcher. PowerShell 7 can also decorate the warning with ANSI colors in CI, which breaks the exact text comparison.
Resolve the expected report path, build the startup test tree under its resolved directory, and request plain text from the spawned PowerShell with NO_COLOR. The checks still compare the exact warning, debugger arguments, cache path, exit codes, report contents and process cleanup. The patch changes two test files.
The original Windows Debug job reported exactly these two failures out of 1,040 tests. The focused Windows 2025 run passed at this PR commit with a real 8.3 temporary-directory alias on the profile volume. All six call-evidence cases passed, and the startup suite reported zero failures under both Windows PowerShell 5.1 and PowerShell 7.
On local Windows, all six call-evidence cases passed and the complete startup suite reported zero failures under both Windows PowerShell and pwsh. The shell that launched the suite had color enabled and a temporary path containing spaces.
python -B tests/call_evidence_check.pypython -B tests/startup_run_ps1_check.pygit diff --check origin/main...HEADAI-assisted with Codex (GPT-6.2 Astra xhigh).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T05:39:33Z.
Review: COMMENTED
Review of head
630c543895(tests only: tests/call_evidence_check.py, tests/startup_run_ps1_check.py).Findings: 0 P1, 0 P2.
Path(__file__).resolve()in tools/call_evidence.py), so comparing againstexpected_output.resolve()is correct on hosts where the temp dir is a symlink or 8.3 short name..resolve()on the temp root andNO_COLOR=1make the warning text comparison independent of ANSI colors. Test-only, no production change, no clean-room concern.Commands executed locally:
python3 tests/startup_run_ps1_check.py-> text-only pass (not a Windows host)python3 tests/call_evidence_check.py(venv with pefile) -> Ran 6 tests, OKpython3 tests/docs_links_check.py-> Self-test passed, 18 files / 408 linkspython3 tests/bidi_controls_check.py-> no bidirectional controlsgit diff --check origin/main...HEAD-> cleanprint(output)->print(output.parent): call_evidence_check FAILED (1 failure); reverted withgit checkout -- ..Only .py files touched, so no Windows build run was needed on my side. The GitHub check "Build and test on Windows" was still pending when I reviewed.
AI-assisted; commands listed were executed locally.