New feature: Run selected tests from test cycle.

This commit is contained in:
Shital Savekar 2017-07-10 15:25:52 +05:30
Родитель c082173bba
Коммит 13b7172082
2 изменённых файлов: 23 добавлений и 4 удалений

Просмотреть файл

@ -19,7 +19,8 @@ param (
[switch] $upload,
[switch] $help,
[string] $Distro,
[string] $cycleName,
[string] $cycleName,
[string] $RunSelectedTests,
[string] $TestPriority,
[string] $osImage,
[switch] $EconomyMode,
@ -83,6 +84,10 @@ if ( $customLISBranch )
{
Set-Variable -Name customLISBranch -Value $customLISBranch -Scope Global
}
if ( $RunSelectedTests )
{
Set-Variable -Name RunSelectedTests -Value $RunSelectedTests -Scope Global
}
if ( $xmlConfig.config.Azure.General.StorageAccount -imatch "NewStorage_" )
{
$NewASMStorageAccountType = ($xmlConfig.config.Azure.General.StorageAccount).Replace("NewStorage_","")

Просмотреть файл

@ -220,14 +220,28 @@ Function RunTestsOnCycle ($cycleName , $xmlConfig, $Distro )
$testCount = 1
}
for ($counter = 0; $counter -lt $testCount; $counter++)
foreach ($test in $currentCycleData.test)
{
$test = $currentCycleData.test[$counter]
if (-not $test)
{
$test = $currentCycleData.test
}
$currentTestData = GetCurrentTestData -xmlConfig $xmlConfig -testName $test.Name
if ($RunSelectedTests)
{
if ($RunSelectedTests.Trim().Replace(" ","").Split(",") -contains $test.Name)
{
$currentTestData = GetCurrentTestData -xmlConfig $xmlConfig -testName $test.Name
}
else
{
LogMsg "Skipping $($test.Name) because it is not in selected tests to run."
Continue;
}
}
else
{
$currentTestData = GetCurrentTestData -xmlConfig $xmlConfig -testName $test.Name
}
# Generate Unique Test
$server = $xmlConfig.config.global.ServerEnv.Server
$cluster = $xmlConfig.config.global.ClusterEnv.Cluster