Skip to content

Commit ee8f892

Browse files
committed
Add ServiceHub core host integration test CI
1 parent 82a74fe commit ee8f892

4 files changed

Lines changed: 48 additions & 4 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Separate pipeline from normal integration CI to allow branches to change legs
2+
3+
# Branches that trigger a build on commit
4+
trigger:
5+
- main
6+
- main-vs-deps
7+
- release/*
8+
- features/*
9+
- demos/*
10+
11+
# Branches that are allowed to trigger a build via /azp run.
12+
# Automatic building of all PRs is disabled in the pipeline's trigger page.
13+
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#comment-triggers
14+
pr:
15+
- main
16+
- main-vs-deps
17+
- release/*
18+
- features/*
19+
- demos/*
20+
21+
jobs:
22+
- job: VS_Integration_CoreHost
23+
pool:
24+
name: NetCorePublic-Pool
25+
queue: $(queueName)
26+
timeoutInMinutes: 135
27+
28+
steps:
29+
- template: eng/pipelines/test-integration-job.yml
30+
parameters:
31+
configuration: Debug
32+
oop64bit: true
33+
oopCoreClr: true

eng/build.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ param (
4545
[switch]$warnAsError = $false,
4646
[switch]$sourceBuild = $false,
4747
[switch]$oop64bit = $true,
48+
[switch]$oopCoreClr = $false,
4849
[switch]$lspEditor = $false,
4950

5051
# official build settings
@@ -634,6 +635,7 @@ function Setup-IntegrationTestRun() {
634635
}
635636

636637
$env:ROSLYN_OOP64BIT = "$oop64bit"
638+
$env:ROSLYN_OOPCORECLR = "$oopCoreClr"
637639
$env:ROSLYN_LSPEDITOR = "$lspEditor"
638640
}
639641

eng/pipelines/test-integration-job.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ parameters:
88
# So in order to pass a parameter that comes from a variable these must be typed as string.
99
type: string
1010
default: true
11+
- name: oopCoreClr
12+
type: string
13+
default: false
1114
- name: lspEditor
1215
type: string
1316
default: false
@@ -19,22 +22,22 @@ steps:
1922
displayName: Build and Test
2023
inputs:
2124
filePath: eng/build.ps1
22-
arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -collectDumps -lspEditor:$${{ parameters.lspEditor }}
25+
arguments: -ci -restore -build -pack -sign -publish -binaryLog -configuration ${{ parameters.configuration }} -prepareMachine -testVsi -oop64bit:$${{ parameters.oop64bit }} -oopCoreClr:$${{ parameters.oopCoreClr }} -collectDumps -lspEditor:$${{ parameters.lspEditor }}
2326

2427
- task: PublishTestResults@2
2528
displayName: Publish xUnit Test Results
2629
inputs:
2730
testRunner: XUnit
2831
testResultsFiles: $(Build.SourcesDirectory)\artifacts\TestResults\${{ parameters.configuration }}\*.xml
2932
mergeTestResults: true
30-
testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }}'
33+
testRunTitle: '$(System.JobAttempt)-Integration ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }}'
3134
condition: always()
3235

3336
- task: PublishBuildArtifacts@1
3437
displayName: Publish Logs
3538
inputs:
3639
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\log\${{ parameters.configuration }}'
37-
ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
40+
ArtifactName: '$(System.JobAttempt)-Logs ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
3841
publishLocation: Container
3942
continueOnError: true
4043
condition: not(succeeded())
@@ -43,7 +46,7 @@ steps:
4346
displayName: Publish Screenshots
4447
inputs:
4548
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\bin\Microsoft.VisualStudio.LanguageServices.IntegrationTests\${{ parameters.configuration }}\net472\xUnitResults'
46-
ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
49+
ArtifactName: '$(System.JobAttempt)-Screenshots ${{ parameters.configuration }} OOP64_${{ parameters.oop64bit }} OOPCoreClr_${{ parameters.oopCoreClr }} LspEditor_${{ parameters.lspEditor }} $(Build.BuildNumber)'
4750
publishLocation: Container
4851
continueOnError: true
4952
condition: not(succeeded())

src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ private static Process StartNewVisualStudioProcess(string installationPath, int
360360
Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"Roslyn\\Internal\\OnOff\\Features\" OOP64Bit dword 0")).WaitForExit();
361361
}
362362

363+
// Configure RemoteHostOptions.OOPCoreClrFeatureFlag for testing
364+
if (string.Equals(Environment.GetEnvironmentVariable("ROSLYN_OOPCORECLR"), "true", StringComparison.OrdinalIgnoreCase))
365+
{
366+
Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"FeatureFlags\\Roslyn\\ServiceHubCore\" Value dword 1")).WaitForExit();
367+
}
368+
363369
_firstLaunch = false;
364370
}
365371

0 commit comments

Comments
 (0)