Skip to content

Commit

Permalink
Cherry-pick from master (#9843)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitin Gurram authored Mar 15, 2019
1 parent c9cc751 commit 57f71da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Tasks/RunDistributedTestsV1/RunDistributedTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Tasks/RunDistributedTestsV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 148,
"Patch": 2
"Patch": 3
},
"deprecated": true,
"runsOn": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/RunDistributedTestsV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 1,
"Minor": 148,
"Patch": 2
"Patch": 3
},
"deprecated": true,
"runsOn": [
Expand Down

0 comments on commit 57f71da

Please sign in to comment.