Skip to content

Commit

Permalink
Merge pull request dotnet#57228 from genlu/OopCoreIntegrationTest
Browse files Browse the repository at this point in the history
Add ServiceHub core host integration test CI
  • Loading branch information
JoeRobich authored Oct 22, 2021
2 parents 7210244 + be95c7e commit 145752d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
40 changes: 40 additions & 0 deletions azure-pipelines-integration-corehost.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Separate pipeline from normal integration CI to allow branches to change legs

# Branches that trigger a build on commit
trigger:
- main
- main-vs-deps
- release/*
- features/*
- demos/*

# Branches that are allowed to trigger a build via /azp run.
# Automatic building of all PRs is disabled in the pipeline's trigger page.
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#comment-triggers
pr:
- main
- main-vs-deps
- release/*
- features/*
- demos/*

jobs:
- job: VS_Integration_CoreHost
pool:
name: NetCorePublic-Pool
queue: $(queueName)
strategy:
maxParallel: 2
matrix:
debug:
_configuration: Debug
release:
_configuration: Release
timeoutInMinutes: 135

steps:
- template: eng/pipelines/test-integration-job.yml
parameters:
configuration: $(_configuration)
oop64bit: true
oopCoreClr: true
2 changes: 2 additions & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ param (
[switch]$warnAsError = $false,
[switch]$sourceBuild = $false,
[switch]$oop64bit = $true,
[switch]$oopCoreClr = $false,
[switch]$lspEditor = $false,

# official build settings
Expand Down Expand Up @@ -635,6 +636,7 @@ function Setup-IntegrationTestRun() {
}

$env:ROSLYN_OOP64BIT = "$oop64bit"
$env:ROSLYN_OOPCORECLR = "$oopCoreClr"
$env:ROSLYN_LSPEDITOR = "$lspEditor"
}

Expand Down
11 changes: 7 additions & 4 deletions eng/pipelines/test-integration-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ parameters:
# So in order to pass a parameter that comes from a variable these must be typed as string.
type: string
default: true
- name: oopCoreClr
type: string
default: false
- name: lspEditor
type: string
default: false
Expand All @@ -19,22 +22,22 @@ steps:
displayName: Build and Test
inputs:
filePath: eng/build.ps1
arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -collectDumps -lspEditor:$${{ parameters.lspEditor }}
arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -oopCoreClr:$${{ parameters.oopCoreClr }} -collectDumps -lspEditor:$${{ parameters.lspEditor }}

- task: PublishTestResults@2
displayName: Publish xUnit Test Results
inputs:
testRunner: XUnit
testResultsFiles: $(Build.SourcesDirectory)\artifacts\TestResults\${{ parameters.configuration }}\*.xml
mergeTestResults: true
testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }}'
testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }}'
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\${{ parameters.configuration }}'
ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
Expand All @@ -43,7 +46,7 @@ steps:
displayName: Publish Screenshots
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\bin\Microsoft.VisualStudio.LanguageServices.IntegrationTests\${{ parameters.configuration }}\net472\xUnitResults'
ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
publishLocation: Container
continueOnError: true
condition: not(succeeded())
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ private static Process StartNewVisualStudioProcess(string installationPath, int
Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"Roslyn\\Internal\\OnOff\\Features\" OOP64Bit dword 0")).WaitForExit();
}

// Configure RemoteHostOptions.OOPCoreClrFeatureFlag for testing
if (string.Equals(Environment.GetEnvironmentVariable("ROSLYN_OOPCORECLR"), "true", StringComparison.OrdinalIgnoreCase))
{
Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"FeatureFlags\\Roslyn\\ServiceHubCore\" Value dword 1")).WaitForExit();
}

_firstLaunch = false;
}

Expand Down

0 comments on commit 145752d

Please sign in to comment.