Extract Get-HostMachineArch for the setup.ps1 Pester suite (#7606)

This commit is contained in:
Daniel Han 2026-07-29 02:50:01 -07:00 committed by GitHub
parent 470fd30901
commit f21b280cca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,8 @@ BeforeAll {
foreach ($fn in @('Resolve-VsGeneratorFromLabel', 'Find-VsBuildTools', 'Get-VcBuildCustomizationsDir',
'Test-CmakeSupportsGenerator', 'Get-CmakeVersion', 'Test-CmakeListsGenerator',
'Test-CmakeCanDriveGenerator', 'Get-FallbackVsGenerator',
'Ensure-BuildToolsForLlamaSourceBuild', 'Test-VCRedistInstalled')) {
'Ensure-BuildToolsForLlamaSourceBuild', 'Test-VCRedistInstalled',
'Get-HostMachineArch')) {
$src = Get-FunctionSource -Path $script:SetupPs1 -Name $fn
if (-not $src) { throw "Function '$fn' not found in $script:SetupPs1 - cannot test the real code." }
. ([scriptblock]::Create($src))