2020-02-29 03:01:21 +03:00
|
|
|
param(
|
2020-08-11 23:19:28 +03:00
|
|
|
[string]$dotnet = "dotnet",
|
2020-11-11 23:43:01 +03:00
|
|
|
[ValidateSet("all", "netcoreapp3.1", "net48", "net5.0")]
|
2020-08-11 23:19:28 +03:00
|
|
|
[string]$framework = "all",
|
2020-11-18 00:25:43 +03:00
|
|
|
[ValidateSet("all", "systematic", "tasks-systematic", "actors", "actors-systematic", "standalone")]
|
2020-08-11 23:19:28 +03:00
|
|
|
[string]$test = "all",
|
|
|
|
[string]$filter = "",
|
|
|
|
[string]$logger = "",
|
|
|
|
[ValidateSet("quiet", "minimal", "normal", "detailed", "diagnostic")]
|
|
|
|
[string]$v = "normal"
|
2020-02-29 03:01:21 +03:00
|
|
|
)
|
|
|
|
|
2020-08-11 23:19:28 +03:00
|
|
|
Import-Module $PSScriptRoot/powershell/common.psm1 -Force
|
2020-02-29 03:01:21 +03:00
|
|
|
|
|
|
|
$targets = [ordered]@{
|
2020-10-22 01:39:52 +03:00
|
|
|
"systematic" = "Tests.SystematicTesting"
|
2020-11-12 19:42:16 +03:00
|
|
|
"tasks-systematic" = "Tests.Tasks.SystematicTesting"
|
2020-10-22 04:22:44 +03:00
|
|
|
"actors" = "Tests.Actors"
|
|
|
|
"actors-systematic" = "Tests.Actors.SystematicTesting"
|
2020-10-22 01:39:52 +03:00
|
|
|
"standalone" = "Tests.Standalone"
|
2020-02-29 03:01:21 +03:00
|
|
|
}
|
|
|
|
|
2020-08-11 23:19:28 +03:00
|
|
|
[System.Environment]::SetEnvironmentVariable('COYOTE_CLI_TELEMETRY_OPTOUT', '1')
|
2020-06-04 00:36:37 +03:00
|
|
|
|
2020-02-29 03:01:21 +03:00
|
|
|
Write-Comment -prefix "." -text "Running the Coyote tests" -color "yellow"
|
|
|
|
|
2021-03-11 09:59:16 +03:00
|
|
|
# Run all enabled tests.
|
2020-10-22 04:22:44 +03:00
|
|
|
foreach ($kvp in $targets.GetEnumerator()) {
|
|
|
|
if (($test -ne "all") -and ($test -ne $($kvp.Name))) {
|
|
|
|
continue
|
|
|
|
}
|
2020-08-14 03:19:10 +03:00
|
|
|
|
2021-03-11 09:59:16 +03:00
|
|
|
$frameworks = Get-ChildItem -Path "$PSScriptRoot/../Tests/$($kvp.Value)/bin" | Where-Object Name -CNotIn "netstandard2.0", "netstandard2.1" | Select-Object -expand Name
|
|
|
|
|
2020-10-22 04:22:44 +03:00
|
|
|
foreach ($f in $frameworks) {
|
|
|
|
if (($framework -ne "all") -and ($f -ne $framework)) {
|
|
|
|
continue
|
|
|
|
}
|
2021-03-24 00:58:30 +03:00
|
|
|
|
|
|
|
if (($($kvp.Name) -eq "standalone") -and ($f -eq "net48")) {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2020-08-14 03:19:10 +03:00
|
|
|
$target = "$PSScriptRoot/../Tests/$($kvp.Value)/$($kvp.Value).csproj"
|
|
|
|
Invoke-DotnetTest -dotnet $dotnet -project $($kvp.Name) -target $target -filter $filter -logger $logger -framework $f -verbosity $v
|
2020-02-29 03:01:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Write-Comment -prefix "." -text "Done" -color "green"
|