Repository navigation
Make the native UIA test harness robust to cleanup locks and vcvars extension failures - #805
Merged
Merged
Conversation
…xtension failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: coneilen <coneilen@users.noreply.github.com>
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#802 made the
windows-shellunit part runAccessibilityProvider.Native.Tests.ps1. That passes on hosted runners, but on developer machines it turned passing runs into failures, for two harness reasons:Push-Location $scratchmade the scratch folder the pwsh process's working directory at the native call.Pop-Locationdoesn't change the process directory back, so the finalRemove-Itemfailed with "being used by another process", and the script exited 1 after its checks had passed. Lane D2 hit this on a full unit run (1201/1201 tests and 55/55 sections passed, yet overall exit 1); I reproduced it locally.vcvars64.batexits 1 when an optional extension (ext\ConnectionManagerExe.bat, the VC Linux component) is absent, even though the MSVC environment is usable.call vcvars && cltherefore never compiled on such machines.Changes
Tools/windows/Tests/AccessibilityProvider.Native.Tests.ps1:cmd(cd /d), with noPush-Location, so the pwsh process never holds the scratch folder;vcvars, require a resolvablecl(where cl) instead of trusting vcvars's exit code. A real compile or test failure still fails the run;Test plan
RED: pwsh Tools/windows/Tests/AccessibilityProvider.Native.Tests.ps1 on main 13758a7 (local) -> exit 1, Remove-Item could not remove the scratch folder because it is being used by another process; cmd /c call vcvars64.bat -> exit 1 (ConnectionManagerExe init FAILED)
GREEN: pwsh Tools/windows/Tests/AccessibilityProvider.Native.Tests.ps1 on this branch (local) -> exit 0, Native accessibility provider: 176 checks, 0 failures, no scratch folder left; negative: -VcVars pointing to a no-op batch file with MSVC removed from PATH -> exit 1 (Native accessibility provider tests failed: 1), no scratch left
REGRESSION: pwsh Tools/windows/Tests/ValidationRunner.Tests.ps1 -> ValidationRunner.Tests.ps1: PASS; git diff --check -> clean; bash Tools/ci/tests/classify-changes.test.sh -> 59 passed, 0 failed
Exact-head CI shard 0 must still show
Native accessibility provider: N checks, 0 failureswith N greater than 0. macOSmake testandmake checkwere not run, because no Swift changed.Checklist
git commit -s) per the DCOmake test)make check)