diff --git a/Tasks/RunDistributedTestsV1/RunDistributedTests.ps1 b/Tasks/RunDistributedTestsV1/RunDistributedTests.ps1 index 6eaddb31f164..7ac15d821be0 100644 --- a/Tasks/RunDistributedTestsV1/RunDistributedTests.ps1 +++ b/Tasks/RunDistributedTestsV1/RunDistributedTests.ps1 @@ -148,13 +148,6 @@ Function Override-TestSettingProperties return $hasOverridenProperties } -# Error out unless there is a workaround -$supportrft = Get-VstsTaskVariable -Name 'RFTSupport' -AsBool -if(-not $supportrft) -{ - throw "This task and its companion task (Visual Studio Test Agent Deployment) are now not supported. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent phase setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests. Visit https://aka.ms/testingwithphases for more information." -} - Write-Warning "This task and it’s companion task (Visual Studio Test Agent Deployment) are now deprecated and will stop working on 10-March-2019. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent phase setting. Use the ‘Visual Studio Test Platform’ task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests. Visit https://aka.ms/testingwithphases for more information." Write-Verbose "Entering script RunDistributedTests.ps1" Write-Verbose "TestMachineGroup = $testMachineGroup" @@ -190,6 +183,13 @@ $checkTestAgentCompatScriptLocationMemberExists = CmdletHasMember "CheckTestAge $checkCustomSlicingEnabledMemberExists = CmdletHasMember "CustomSlicingEnabled" $taskContextMemberExists = CmdletHasMember "TaskContext" +# Error out unless there is a workaround +$supportrft = Get-TaskVariable -Context $distributedTaskContext -Name "RFTSupport" +if ($supportrft -notlike 'true') +{ + throw "This task and its companion task (Visual Studio Test Agent Deployment) are now not supported. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent phase setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests. Visit https://aka.ms/testingwithphases for more information." +} + if($overrideRunParams -and $runSettingsFile -and (Test-Path $runSettingsFile)) { if (([string]::Compare([io.path]::GetExtension($runSettingsFile), ".testsettings", $True) -eq 0)) diff --git a/Tasks/RunDistributedTestsV1/task.json b/Tasks/RunDistributedTestsV1/task.json index 340d5d1b552d..e2418388e6bd 100644 --- a/Tasks/RunDistributedTestsV1/task.json +++ b/Tasks/RunDistributedTestsV1/task.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "deprecated": true, "runsOn": [ diff --git a/Tasks/RunDistributedTestsV1/task.loc.json b/Tasks/RunDistributedTestsV1/task.loc.json index d434d796c653..a95438bdf8dd 100644 --- a/Tasks/RunDistributedTestsV1/task.loc.json +++ b/Tasks/RunDistributedTestsV1/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "deprecated": true, "runsOn": [