Scripts: run smoke.ps1 on Windows PowerShell 5.1 #315

Closed
SandimL wants to merge 2 commits from upstream-pr/318 into main
SandimL commented 2026-11-23 23:12:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SandimL on 2026-11-23T23:12:10Z.


Stacked on #281; only commit f52ae3d belongs here.

Windows PowerShell 5.1 does not provide New-TemporaryFile, and its Start-Process fails when the process environment contains both Path and PATH. That made scripts/smoke.ps1 abort before it could run a title on some Windows machines, including the contributor machine used here.

What is in it

  • scripts/smoke.ps1: use System.Diagnostics.ProcessStartInfo with asynchronous stdout/stderr reads instead of New-TemporaryFile plus Start-Process. This works with Windows PowerShell 5.1 and avoids the duplicate-case environment failure.

Tested

  • Windows PowerShell 5.1.26100.9818 on Windows 11 build 26300.
  • On the #281 head, before this commit the script failed immediately with New-TemporaryFile is not recognized.
  • With this commit, scripts/smoke.ps1 -Game -Seconds 20 completed and emitted an xcl-smoke block; the adapter line came from #281's report path as AMD Radeon RX 6750 XT even though the WMI query is denied on this machine.

Not tested

  • PowerShell 7 on this machine (the pwsh.exe app alias is present but inaccessible).
  • A retail title; the repository test title was used only to exercise the process and report path.

AI use

  • Codex; the exact model name was not exposed in this session. It diagnosed the local failure, wrote the script change, and ran the validation.
<!-- greyfinch-sync:ivall/xcl:issue:6570769607 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/318). Originally posted by [SandimL](https://github.com/SandimL) on 2026-11-23T23:12:10Z. --- Stacked on #281; only commit f52ae3d belongs here. Windows PowerShell 5.1 does not provide New-TemporaryFile, and its Start-Process fails when the process environment contains both Path and PATH. That made scripts/smoke.ps1 abort before it could run a title on some Windows machines, including the contributor machine used here. **What is in it** - scripts/smoke.ps1: use System.Diagnostics.ProcessStartInfo with asynchronous stdout/stderr reads instead of New-TemporaryFile plus Start-Process. This works with Windows PowerShell 5.1 and avoids the duplicate-case environment failure. **Tested** - Windows PowerShell 5.1.26100.9818 on Windows 11 build 26300. - On the #281 head, before this commit the script failed immediately with New-TemporaryFile is not recognized. - With this commit, scripts/smoke.ps1 -Game <test title> -Seconds 20 completed and emitted an xcl-smoke block; the adapter line came from #281's report path as AMD Radeon RX 6750 XT even though the WMI query is denied on this machine. **Not tested** - PowerShell 7 on this machine (the pwsh.exe app alias is present but inaccessible). - A retail title; the repository test title was used only to exercise the process and report path. **AI use** - Codex; the exact model name was not exposed in this session. It diagnosed the local failure, wrote the script change, and ran the validation.
upstream-sync closed this pull request 2026-11-24 06:58:09 +00:00
ivall commented 2026-11-24 07:04:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T00:03:56Z.


Merged by cherry-picking both commits (yours and #281's, which it is stacked on) into a6f5f7a. Checked on an RX 9070 (RDNA4) on main a6f5f7a, together with #335, #322, #331, #330, #338, #318 and #332: cargo test --workspace -- --test-threads=4 - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it.

<!-- greyfinch-sync:ivall/xcl:comment:7117663957 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/318#issuecomment-7117663957). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T00:03:56Z. --- Merged by cherry-picking both commits (yours and #281's, which it is stacked on) into a6f5f7a. Checked on an RX 9070 (RDNA4) on main a6f5f7a, together with #335, #322, #331, #330, #338, #318 and #332: `cargo test --workspace -- --test-threads=4` - 636 unit tests passed, 0 failed; the retail game reaches its menu and draws it (frame dump) and goes on past it.

Pull request closed

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
xcl-dev/xcl!315
No description provided.