Skip to content

Commit

Permalink
Add support for custom test filter based on fully qualified test name
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussell committed Nov 15, 2024
1 parent 242378b commit 3caa30e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/run-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ param(
[ValidateSet("runtime", "runtime-deps", "aspnet", "sdk", "pre-build", "sample", "image-size", "monitor", "aspire-dashboard")]
[string[]]$TestCategories = @("runtime", "runtime-deps", "aspnet", "sdk", "monitor", "aspire-dashboard"),

[string]$CustomTestFilter,

[string]$InternalAccessToken
)

Expand Down Expand Up @@ -143,9 +145,15 @@ Try {
exit;
}

$testFilter = "--filter `"$testFilter`""
if ($CustomTestFilter)
{
$testFilter = "$CustomTestFilter&($testFilter)"
}

$testFilter = "--filter '$testFilter'"
}

Write-Host "`nRunning tests with $testFilter`n"
Exec "$DotnetInstallDir/dotnet test $testFilter --logger:trx"

if ($TestCategories.Contains('image-size')) {
Expand Down

0 comments on commit 3caa30e

Please sign in to comment.