test(validation): Add Git + 7-Zip checks to Validate-SetupState

§6.6 Tier-1 Toolchain (Git for Windows, 7-Zip) now included in final
state validation. Checks:
- 'Git for Windows (git.exe in PATH)'
- '7-Zip (7z.exe in PATH)'

Added to both initial validation pass and re-validation pass (post-remediation).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simone
2026-05-10 21:01:46 +02:00
parent 13ecd823dc
commit d732e182ce
+10
View File
@@ -220,6 +220,14 @@ try {
$msb -and (Test-Path $msb.Source) $msb -and (Test-Path $msb.Source)
} }
# Tier-1 Toolchain (§6.6)
Chk 'Git for Windows (git.exe in PATH)' {
Get-Command git -ErrorAction SilentlyContinue
}
Chk '7-Zip (7z.exe in PATH)' {
Get-Command 7z -ErrorAction SilentlyContinue
}
# No leftover installer files in C:\CI root # No leftover installer files in C:\CI root
Chk 'no leftover installer scripts in C:\CI' { Chk 'no leftover installer scripts in C:\CI' {
$leftovers = Get-ChildItem 'C:\CI' -File -EA SilentlyContinue | $leftovers = Get-ChildItem 'C:\CI' -File -EA SilentlyContinue |
@@ -337,6 +345,8 @@ try {
Chk 'Python C:\Python\python.exe present' { Test-Path 'C:\Python\python.exe' } Chk 'Python C:\Python\python.exe present' { Test-Path 'C:\Python\python.exe' }
Chk "Python version $PythonVersion" { $v=(& 'C:\Python\python.exe' --version 2>&1) -as [string]; $v -and $v.Trim() -eq "Python $PythonVersion" } Chk "Python version $PythonVersion" { $v=(& 'C:\Python\python.exe' --version 2>&1) -as [string]; $v -and $v.Trim() -eq "Python $PythonVersion" }
Chk 'MSBuild.exe present' { $msb=Get-Command msbuild -EA SilentlyContinue; $msb -and (Test-Path $msb.Source) } Chk 'MSBuild.exe present' { $msb=Get-Command msbuild -EA SilentlyContinue; $msb -and (Test-Path $msb.Source) }
Chk 'Git for Windows (git.exe in PATH)' { Get-Command git -ErrorAction SilentlyContinue }
Chk '7-Zip (7z.exe in PATH)' { Get-Command 7z -ErrorAction SilentlyContinue }
Chk 'no leftover installer scripts in C:\CI' { $l=Get-ChildItem 'C:\CI' -File -EA SilentlyContinue | Where-Object { $_.Name -match 'wu_worker|wu_result|vs_buildtools|dotnet-install' }; $l.Count -eq 0 } Chk 'no leftover installer scripts in C:\CI' { $l=Get-ChildItem 'C:\CI' -File -EA SilentlyContinue | Where-Object { $_.Name -match 'wu_worker|wu_result|vs_buildtools|dotnet-install' }; $l.Count -eq 0 }
return $results.ToArray() return $results.ToArray()
} -ArgumentList $BuildUsername, $DotNetChannel, $PythonVersion } -ArgumentList $BuildUsername, $DotNetChannel, $PythonVersion