Migrate PSWindowsUpdate GUI to WinUI 3 - #2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22e5786f6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $errorLog = Join-Path (Split-Path -Parent $executable) 'ui-smoke-error.log' | ||
| if (-not (Test-Path -LiteralPath $executable)) { throw "GUI smoke harness was not built: $executable" } | ||
| if (Test-Path -LiteralPath $errorLog) { Remove-Item -LiteralPath $errorLog -Force } | ||
| & $dotnet build $project -c UiSmoke '-p:Platform=x64' '-p:UiSmokeBuild=true' "-p:OutputPath=$smokeRoot\" --no-restore |
There was a problem hiding this comment.
Locate the smoke executable under the framework/RID output path
This script will fail before running either smoke scenario: passing -p:OutputPath=$smokeRoot\ to an SDK-style build does not suppress the default target-framework and runtime-identifier suffixes, and this project sets both net10.0-windows10.0.26100.0 and win-x64. The executable is therefore emitted below $smokeRoot\net10.0-windows10.0.26100.0\win-x64\, while the next check looks only for $smokeRoot\PSWindowsUpdateGUI.exe; every normal Build.ps1 run with tests enabled reaches that failing check.
Useful? React with 👍 / 👎.
| @{ Theme = 'Light'; Page = 'updates'; Capture = $lightCapture } | ||
| ) | ||
| foreach ($scenario in $scenarios) { | ||
| $process = Start-Process -FilePath $executable -ArgumentList @('--ui-smoke', '--theme', $scenario.Theme, '--page', $scenario.Page, '--capture', "`"$($scenario.Capture)`"") -PassThru -Wait |
There was a problem hiding this comment.
Bound each smoke scenario with a timeout
If WinUI initialization, activation, or screenshot capture deadlocks, Start-Process -Wait waits indefinitely and leaves CI/build invocations hung rather than reporting a failed smoke test. The previous harness had a 20-second deadline; retain an equivalent timeout and terminate the process so a broken GUI startup fails predictably.
Useful? React with 👍 / 👎.
Summary
3.0.0-beta.1release metadataSafety and packaging
UiSmokeconfiguration and a fake WUA adapterVerify-Release.ps1rejects a published EXE unless its embedded manifest has the production identity andrequireAdministratorValidation
git diff --checkpassed