зеркало из https://github.com/microsoft/lisa.git
Added script to get test regions list
This commit is contained in:
Родитель
d3ce7b54c6
Коммит
c40909780f
|
@ -0,0 +1,40 @@
|
|||
param
|
||||
(
|
||||
$TestByTestName="",
|
||||
$TestByCategorizedTestName="",
|
||||
$TestByCategory="",
|
||||
$TestByTag=""
|
||||
)
|
||||
Get-ChildItem .\Libraries -Recurse | Where-Object { $_.FullName.EndsWith(".psm1") } | ForEach-Object { Import-Module $_.FullName -Force -Global }
|
||||
|
||||
$TestRegions = @()
|
||||
|
||||
if ( $TestByTestName )
|
||||
{
|
||||
foreach( $Test in $TestByTestName.Split(","))
|
||||
{
|
||||
$TestRegions += $Test.Split(">>")[$Test.Split(">>").Count - 1]
|
||||
}
|
||||
}
|
||||
if ( $TestByCategorizedTestName )
|
||||
{
|
||||
foreach( $Test in $TestByCategorizedTestName.Split(","))
|
||||
{
|
||||
$TestRegions += $Test.Split(">>")[$Test.Split(">>").Count - 1]
|
||||
}
|
||||
}
|
||||
if ( $TestByTag )
|
||||
{
|
||||
foreach( $Test in $TestByTag.Split(","))
|
||||
{
|
||||
$TestRegions += $Test.Split(">>")[$Test.Split(">>").Count - 1]
|
||||
}
|
||||
}
|
||||
|
||||
$UniqueTestRegions = $TestRegions | Get-Unique
|
||||
LogMsg "Selected test regions:"
|
||||
$i = 1
|
||||
$CurrentTestRegions = ""
|
||||
Set-Content -Value "" -Path .\CurrentTestRegions.azure.env -Force -NoNewline
|
||||
$UniqueTestRegions | ForEach-Object { LogMsg "$i. $_"; $i += 1; $CurrentTestRegions += "$_," }
|
||||
Set-Content -Value $CurrentTestRegions.TrimEnd(",") -Path .\CurrentTestRegions.azure.env -Force -NoNewline -Verbose
|
Загрузка…
Ссылка в новой задаче