Skip to content

Commit

Permalink
Allow default matrix selection override
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored and azure-sdk committed Oct 24, 2024
1 parent ecdff6d commit 8778a5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion eng/common/scripts/stress-testing/find-all-stress-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,21 @@ function FindStressPackages(

VerifyAddonsVersion $chart $chartFile

# Default to "sparse" matrix selection type, unless a default is specified
# in Chart.yaml annotations, or an override is passed in from the command line
$selection = if ($MatrixSelection) {
$MatrixSelection
} elseif ($chart['annotations'] -and $chart['annotations']['matrixSelection']) {
$chart['annotations']['matrixSelection']
} else {
"sparse"
}

$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
if (Test-Path $matrixFilePath) {
GenerateScenarioMatrix `
-matrixFilePath $matrixFilePath `
-Selection $MatrixSelection `
-Selection $selection `
-DisplayNameFilter $MatrixDisplayNameFilter `
-Filters $MatrixFilters `
-Replace $MatrixReplace `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function DeployStressTests(
[Parameter(Mandatory=$False)][switch]$Template,
[Parameter(Mandatory=$False)][switch]$RetryFailedTests,
[Parameter(Mandatory=$False)][string]$MatrixFileName,
[Parameter(Mandatory=$False)][string]$MatrixSelection = "sparse",
[Parameter(Mandatory=$False)][string]$MatrixSelection,
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
[Parameter(Mandatory=$False)][array]$MatrixFilters,
[Parameter(Mandatory=$False)][array]$MatrixReplace,
Expand Down

0 comments on commit 8778a5d

Please sign in to comment.