RunHelix.ps1 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <#
  2. .SYNOPSIS
  3. Runs the specified test project on a Helix machine.
  4. .DESCRIPTION
  5. This script runs the Helix msbuild task on the given project and publishes then uploads the output and runs tests on the Helix machine(s) passed in.
  6. .PARAMETER Project
  7. The test project to publish and send to Helix.
  8. .PARAMETER HelixQueues
  9. Set the Helix queues to use. The list is '+' or ';'-separated.
  10. Some supported queues:
  11. Ubuntu.1604.Amd64.Open
  12. Ubuntu.1804.Amd64.Open
  13. Windows.10.Amd64.Open
  14. Windows.81.Amd64.Open
  15. Windows.7.Amd64.Open
  16. OSX.1014.Amd64.Open
  17. Centos.7.Amd64.Open
  18. Debian.9.Amd64.Open
  19. Redhat.7.Amd64.Open
  20. .PARAMETER RunQuarantinedTests
  21. By default quarantined tests are not run. Set this to $true to run only the quarantined tests.
  22. #>
  23. param(
  24. [Parameter(Mandatory=$true)]
  25. [string]$Project,
  26. [string]$HelixQueues = "Windows.10.Amd64.Open",
  27. [string]$TargetArchitecture = "x64",
  28. [bool]$RunQuarantinedTests = $false
  29. )
  30. $ErrorActionPreference = 'Stop'
  31. $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
  32. Set-StrictMode -Version 1
  33. $env:BUILD_REASON="PullRequest"
  34. $env:BUILD_SOURCEBRANCH="local"
  35. $env:BUILD_REPOSITORY_NAME="aspnetcore"
  36. $env:SYSTEM_TEAMPROJECT="aspnetcore"
  37. Write-Host -ForegroundColor Yellow "If running tests that need the shared Fx, run './build -pack -all' before this."
  38. Write-Host -ForegroundColor Yellow "And if packing for a different platform, add '/p:CrossgenOutput=false'."
  39. $HelixQueues = $HelixQueues -replace ";", "%3B"
  40. dotnet msbuild $Project /t:Helix /p:TargetArchitecture="$TargetArchitecture" /p:IsRequiredCheck=true `
  41. /p:IsHelixDaily=true /p:HelixTargetQueues=$HelixQueues /p:RunQuarantinedTests=$RunQuarantinedTests `
  42. /p:_UseHelixOpenQueues=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log