coyote/Scripts/run-tests.ps1

38 строки
1.2 KiB
PowerShell
Исходник Обычный вид История

2020-02-29 03:01:21 +03:00
param(
[string]$dotnet="dotnet",
[ValidateSet("all","netcoreapp3.1","net47","net48")]
2020-02-29 03:01:21 +03:00
[string]$framework="all",
[ValidateSet("all","production","testing")]
2020-02-29 03:01:21 +03:00
[string]$test="all",
[string]$filter="",
[ValidateSet("quiet","minimal","normal","detailed","diagnostic")]
[string]$v="normal"
)
Import-Module $PSScriptRoot\powershell\common.psm1
$frameworks = Get-ChildItem -Path "$PSScriptRoot\..\Tests\bin" | where Name -CNotIn "netstandard2.0", "netstandard2.1" | select -expand Name
2020-02-29 03:01:21 +03:00
$targets = [ordered]@{
"production" = "Production.Tests"
"testing" = "SystematicTesting.Tests"
2020-02-29 03:01:21 +03:00
}
Write-Comment -prefix "." -text "Running the Coyote tests" -color "yellow"
foreach ($kvp in $targets.GetEnumerator()) {
if (($test -ne "all") -and ($test -ne $($kvp.Name))) {
continue
}
foreach ($f in $frameworks) {
if (($framework -ne "all") -and ($f -ne $framework)) {
continue
}
$target = "$PSScriptRoot\..\Tests\$($kvp.Value)\$($kvp.Value).csproj"
Invoke-DotnetTest -dotnet $dotnet -project $($kvp.Name) -target $target -filter $filter -framework $f -verbosity $v
}
}
Write-Comment -prefix "." -text "Done" -color "green"