EvanZhu0721 / 公开仓库
SBMS
SBMS complete the calculation rules for the default logical desktop topology relationship and the physical dimensions of the displays in the Windows multi-screen collaboration system.
.github/scripts/invoke-pester.ps1993 B
1
$ErrorActionPreference = 'Stop'2
Set-StrictMode -Version Latest3
4
Import-Module Pester -RequiredVersion 4.10.1 -Force5
6
$repository = [IO.Path]::GetFullPath(7
(Join-Path $PSScriptRoot '..\..')8
)9
$testRoots = @(10
(Join-Path $repository 'tests')11
(Join-Path $repository 'installer\tests')12
)13
$paths = @(14
$testRoots |15
Where-Object { Test-Path -LiteralPath $_ -PathType Container } |16
ForEach-Object {17
Get-ChildItem -LiteralPath $_ -Filter '*.Tests.ps1' -File -Recurse18
} |19
Sort-Object FullName |20
ForEach-Object { $_.FullName }21
)22
if ($paths.Count -eq 0) {23
throw 'No Pester test files were discovered.'24
}25
26
Write-Host "pester_engine=$($PSVersionTable.PSVersion)"27
Write-Host "pester_files=$($paths.Count)"28
$result = Invoke-Pester -Script $paths -PassThru29
if ($result.FailedCount -ne 0) {30
throw "$($result.FailedCount) Pester test(s) failed."31
}32
33
# Tests may leave a native exit code that the CI PowerShell wrapper would reuse.34
exit 035