Tooling/scripts/unit-test.ps1

19 строки
318 B
PowerShell
Исходник Обычный вид История

$pwd = Get-Location
Set-Location $PSScriptRoot\..\test
[int]$errors = 0
Get-ChildItem -Directory -Filter "*.Test"| ForEach-Object {
2018-08-09 17:33:00 +03:00
Set-Location $_.Name
dotnet test
$errors = $errors + $lastexitcode
Set-Location ..
}
Set-Location $pwd
if ($errors -gt 0)
{
2018-08-09 17:33:00 +03:00
Throw "$errors unit test(s) failed"
}