tests: handle hosted Windows temp paths and warning colors #2209

Merged
RavenCurseBurg merged 1 commit from upstream-pr/2217 into main 2026-11-25 05:40:14 +00:00
RavenCurseBurg commented 2026-11-25 05:35:49 +00:00 (Migrated from github.com)

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.py
  • python -B tests/startup_run_ps1_check.py
  • git diff --check origin/main...HEAD

AI-assisted with Codex (GPT-6.2 Astra xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6597976965 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2217). Originally posted by [RavenCurseBurg](https://github.com/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](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45551407079/job/138993198131) reported exactly these two failures out of 1,040 tests. The [focused Windows 2025 run](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45554469156) 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.py` - `python -B tests/startup_run_ps1_check.py` - `git diff --check origin/main...HEAD` AI-assisted with Codex (GPT-6.2 Astra xhigh).
upstream-sync closed this pull request 2026-11-25 06:01:31 +00:00
tedin7 commented 2026-11-25 06:01:32 +00:00 (Migrated from github.com)

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.

  • call_evidence_check: the tool prints a resolved path (Path(__file__).resolve() in tools/call_evidence.py), so comparing against expected_output.resolve() is correct on hosts where the temp dir is a symlink or 8.3 short name.
  • startup_run_ps1_check: .resolve() on the temp root and NO_COLOR=1 make 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, OK
  • python3 tests/docs_links_check.py -> Self-test passed, 18 files / 408 links
  • python3 tests/bidi_controls_check.py -> no bidirectional controls
  • git diff --check origin/main...HEAD -> clean
  • Mutation: tools/call_evidence.py line 137 print(output) -> print(output.parent): call_evidence_check FAILED (1 failure); reverted with git 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6052399610 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2217#pullrequestreview-6052399610). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T05:39:33Z. **Review:** COMMENTED --- Review of head 630c5438958f09fff877e259dc9c11c819b5257b (tests only: tests/call_evidence_check.py, tests/startup_run_ps1_check.py). Findings: 0 P1, 0 P2. - call_evidence_check: the tool prints a resolved path (`Path(__file__).resolve()` in tools/call_evidence.py), so comparing against `expected_output.resolve()` is correct on hosts where the temp dir is a symlink or 8.3 short name. - startup_run_ps1_check: `.resolve()` on the temp root and `NO_COLOR=1` make 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, OK - `python3 tests/docs_links_check.py` -> Self-test passed, 18 files / 408 links - `python3 tests/bidi_controls_check.py` -> no bidirectional controls - `git diff --check origin/main...HEAD` -> clean - Mutation: tools/call_evidence.py line 137 `print(output)` -> `print(output.parent)`: call_evidence_check FAILED (1 failure); reverted with `git 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2209
No description provided.