提交 39486dd7 编写于 作者: A Andrew Hall (METAL)

Undo formatting

上级 679d23c8
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# it's fine to call `build.ps1 -build -testDesktop` followed by repeated calls to # it's fine to call `build.ps1 -build -testDesktop` followed by repeated calls to
# `.\build.ps1 -testDesktop`. # `.\build.ps1 -testDesktop`.
[CmdletBinding(PositionalBinding = $false)] [CmdletBinding(PositionalBinding=$false)]
param ( param (
[string][Alias('c')]$configuration = "Debug", [string][Alias('c')]$configuration = "Debug",
[string][Alias('v')]$verbosity = "m", [string][Alias('v')]$verbosity = "m",
...@@ -59,7 +59,7 @@ param ( ...@@ -59,7 +59,7 @@ param (
[switch]$testIOperation, [switch]$testIOperation,
[switch]$testLegacyCompletion, [switch]$testLegacyCompletion,
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties) [parameter(ValueFromRemainingArguments=$true)][string[]]$properties)
if ($PSVersionTable.PSVersion.Major -lt "5") { if ($PSVersionTable.PSVersion.Major -lt "5") {
Write-Host "PowerShell version must be 5 or greater (version $($PSVersionTable.PSVersion) detected)" Write-Host "PowerShell version must be 5 or greater (version $($PSVersionTable.PSVersion) detected)"
...@@ -161,8 +161,7 @@ function Process-Arguments() { ...@@ -161,8 +161,7 @@ function Process-Arguments() {
Write-Host "$argName can only be specified for official builds" Write-Host "$argName can only be specified for official builds"
exit 1 exit 1
} }
} } else {
else {
if ($officialBuildId) { if ($officialBuildId) {
Write-Host "$argName must be specified in official builds" Write-Host "$argName must be specified in official builds"
exit 1 exit 1
...@@ -171,8 +170,8 @@ function Process-Arguments() { ...@@ -171,8 +170,8 @@ function Process-Arguments() {
} }
if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) { if ($help -or (($properties -ne $null) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
Print-Usage Print-Usage
exit 0 exit 0
} }
OfficialBuildOnly "officialSkipTests" OfficialBuildOnly "officialSkipTests"
...@@ -186,8 +185,7 @@ function Process-Arguments() { ...@@ -186,8 +185,7 @@ function Process-Arguments() {
$script:procdump = $true $script:procdump = $true
$script:testDesktop = ![System.Boolean]::Parse($officialSkipTests) $script:testDesktop = ![System.Boolean]::Parse($officialSkipTests)
$script:applyOptimizationData = ![System.Boolean]::Parse($officialSkipApplyOptimizationData) $script:applyOptimizationData = ![System.Boolean]::Parse($officialSkipApplyOptimizationData)
} } else {
else {
$script:applyOptimizationData = $false $script:applyOptimizationData = $false
} }
...@@ -290,7 +288,7 @@ function BuildSolution() { ...@@ -290,7 +288,7 @@ function BuildSolution() {
# IBC data are only merged in official built, but we want to test some of the logic in CI builds as well. # IBC data are only merged in official built, but we want to test some of the logic in CI builds as well.
function GetIbcSourceBranchName() { function GetIbcSourceBranchName() {
if (Test-Path variable:global:_IbcSourceBranchName) { if (Test-Path variable:global:_IbcSourceBranchName) {
return $global:_IbcSourceBranchName return $global:_IbcSourceBranchName
} }
function calculate { function calculate {
...@@ -389,12 +387,10 @@ function TestUsingOptimizedRunner() { ...@@ -389,12 +387,10 @@ function TestUsingOptimizedRunner() {
if ($testDesktop -or $testIOperation) { if ($testDesktop -or $testIOperation) {
if ($test32) { if ($test32) {
$dlls = Get-ChildItem -Recurse -Include "*.UnitTests.dll" $binDir $dlls = Get-ChildItem -Recurse -Include "*.UnitTests.dll" $binDir
} } else {
else {
$dlls = Get-ChildItem -Recurse -Include "*.UnitTests.dll" -Exclude "*InteractiveHost*" $binDir $dlls = Get-ChildItem -Recurse -Include "*.UnitTests.dll" -Exclude "*InteractiveHost*" $binDir
} }
} } elseif ($testVsi) {
elseif ($testVsi) {
# Since they require Visual Studio to be installed, ensure that the MSBuildWorkspace tests run along with our VS # Since they require Visual Studio to be installed, ensure that the MSBuildWorkspace tests run along with our VS
# integration tests in CI. # integration tests in CI.
if ($ci) { if ($ci) {
...@@ -402,25 +398,23 @@ function TestUsingOptimizedRunner() { ...@@ -402,25 +398,23 @@ function TestUsingOptimizedRunner() {
} }
$dlls += @(Get-ChildItem -Recurse -Include "*.IntegrationTests.dll" $binDir) $dlls += @(Get-ChildItem -Recurse -Include "*.IntegrationTests.dll" $binDir)
} } else {
else {
$dlls = Get-ChildItem -Recurse -Include "*.IntegrationTests.dll" $binDir $dlls = Get-ChildItem -Recurse -Include "*.IntegrationTests.dll" $binDir
$args += " -trait:Feature=NetCore" $args += " -trait:Feature=NetCore"
} }
# Exclude out the multi-targetted netcore app projects # Exclude out the multi-targetted netcore app projects
$dlls = $dlls | ? { -not ($_.FullName -match ".*netcoreapp.*") } $dlls = $dlls | ?{ -not ($_.FullName -match ".*netcoreapp.*") }
# Exclude out the ref assemblies # Exclude out the ref assemblies
$dlls = $dlls | ? { -not ($_.FullName -match ".*\\ref\\.*") } $dlls = $dlls | ?{ -not ($_.FullName -match ".*\\ref\\.*") }
$dlls = $dlls | ? { -not ($_.FullName -match ".*/ref/.*") } $dlls = $dlls | ?{ -not ($_.FullName -match ".*/ref/.*") }
if ($ci) { if ($ci) {
$args += " -xml" $args += " -xml"
if ($testVsi) { if ($testVsi) {
$args += " -timeout:110" $args += " -timeout:110"
} } else {
else {
$args += " -timeout:65" $args += " -timeout:65"
} }
} }
...@@ -441,8 +435,7 @@ function TestUsingOptimizedRunner() { ...@@ -441,8 +435,7 @@ function TestUsingOptimizedRunner() {
try { try {
Exec-Console $runTests $args Exec-Console $runTests $args
} } finally {
finally {
Get-Process "xunit*" -ErrorAction SilentlyContinue | Stop-Process Get-Process "xunit*" -ErrorAction SilentlyContinue | Stop-Process
if ($testIOperation) { if ($testIOperation) {
Remove-Item env:\ROSLYN_TEST_IOPERATION Remove-Item env:\ROSLYN_TEST_IOPERATION
...@@ -579,8 +572,7 @@ try { ...@@ -579,8 +572,7 @@ try {
Write-Host "Disconnecting from console before attempting reconnection" Write-Host "Disconnecting from console before attempting reconnection"
try { try {
tsdiscon tsdiscon
} } catch {
catch {
# ignore # ignore
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册