Skip to content
2 changes: 1 addition & 1 deletion .github/memory/FILE_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ This file is a **top-level map only**. For per-area directory detail, read the m

| Path | Status | Purpose |
|------|--------|---------|
| `eng/` | Config / Generated | Arcade build engineering. `eng/common/` is DARC-synced — do not hand-edit. `eng/generate-compiler-code.cs` regenerates compiler code. |
| `eng/` | Config / Generated | Arcade build engineering. `eng/common/` is DARC-synced — do not hand-edit. `eng/generate-compiler-code.cs` regenerates compiler code. `eng/config/NuGetPackageUpgradePayload.json` and `eng/prepare-nuget-package-upgrade-payload.ps1` define/stage the Release integration NuGet upgrade payload artifact; `eng/config/NuGetPackageUpgradeValidation.json` lists the packages (and their previously released versions) validated by the legacy packages.config upgrade integration test. |
| `docs/` | Active | Contributor & design docs. New docs use kebab-case filenames in the right subdirectory. |
| Root | Config | Entry points & solution filters: `build.sh`/`Build.cmd`, `test.sh`/`Test.cmd`, `Roslyn.slnx`, `Compilers.slnf`, `Ide.slnf`, `Razor.slnf`, `global.json`, `Directory.*.props/targets`, `Directory.Packages.props`. |
13 changes: 13 additions & 0 deletions .github/memory/testing/ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ public class MyTests
test source code.
- Keep tests focused — avoid unnecessary intermediary assertions; use `.Single()`
rather than asserting a count then indexing.

## VS integration test gates

- VS integration tests can be scoped with the `TestGate` trait
(`Traits.TestGates` in `src/Compilers/Test/Core/Traits/Traits.cs`).
- `eng/pipelines/test-integration-helix.yml` exposes a `testFilter` parameter that
defaults to `TestGate!=NuGetPackageUpgrade`, so ordinary integration jobs skip the
NuGet package upgrade validation tests; a dedicated job opts in with
`TestGate=NuGetPackageUpgrade`. DartLab runs are already scoped to
`TestGate=RoslynVSIntegration` and need no change.
- Package Manager Console commands are driven from integration tests through
`PackageManagerConsoleInProcess`, which waits on a sentinel result file written by
the executed script rather than assuming `DTE.ExecuteCommand` is synchronous.
4 changes: 4 additions & 0 deletions azure-pipelines-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ stages:
queueName: ${{ parameters.queueName }}
buildQueueName: ${{ parameters.buildQueueName }}
timeout: ${{ parameters.timeout }}
# NuGet package upgrade validation runs in a dedicated job, not in ordinary integration runs.
Comment thread
JoeRobich marked this conversation as resolved.
Resolved
testFilter: TestGate!=NuGetPackageUpgrade
configuration: Debug
testRuns:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
Expand All @@ -107,6 +109,8 @@ stages:
queueName: ${{ parameters.queueName }}
buildQueueName: ${{ parameters.buildQueueName }}
timeout: ${{ parameters.timeout }}
# NuGet package upgrade validation runs in a dedicated job, not in ordinary integration runs.
Comment thread
JoeRobich marked this conversation as resolved.
Resolved
testFilter: TestGate!=NuGetPackageUpgrade
configuration: Release
testRuns:
- oop64bit: false
Expand Down
27 changes: 27 additions & 0 deletions eng/config/NuGetPackageUpgradePayload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"sourceOfTruth": "Keep this list synchronized with active RoslynPackageIds in dotnet/roslyn-tools/src/dotnet-roslyn-tools/NuGet/NuGetPublish.cs (currently lines 16-39).",
"description": "Packages staged for legacy packages.config upgrade validation payloads in non-DartLab Release integration pipelines.",
"packageIds": [
"Microsoft.CodeAnalysis",
"Microsoft.CodeAnalysis.Analyzers",
"Microsoft.CodeAnalysis.Common",
"Microsoft.CodeAnalysis.Compilers",
"Microsoft.CodeAnalysis.CSharp",
"Microsoft.CodeAnalysis.CSharp.CodeStyle",
"Microsoft.CodeAnalysis.CSharp.Features",
"Microsoft.CodeAnalysis.CSharp.Scripting",
"Microsoft.CodeAnalysis.CSharp.Workspaces",
"Microsoft.CodeAnalysis.Features",
"Microsoft.CodeAnalysis.Scripting",
"Microsoft.CodeAnalysis.Scripting.Common",
"Microsoft.CodeAnalysis.VisualBasic",
"Microsoft.CodeAnalysis.VisualBasic.CodeStyle",
"Microsoft.CodeAnalysis.VisualBasic.Features",
"Microsoft.CodeAnalysis.VisualBasic.Workspaces",
"Microsoft.CodeAnalysis.Workspaces.Common",
"Microsoft.CodeAnalysis.Workspaces.MSBuild",
"Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts",
"Microsoft.Net.Compilers.Toolset",
"Microsoft.Net.Compilers.Toolset.Framework"
]
}
25 changes: 25 additions & 0 deletions eng/config/NuGetPackageUpgradeValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"description": "Roslyn NuGet packages validated by the legacy packages.config upgrade integration test. 'previousReleaseVersion' is the last stable version published to nuget.org; the test installs it into a legacy project and then upgrades to the locally built packages.",
"packages": [
{
"id": "Microsoft.CodeAnalysis",
"previousReleaseVersion": "5.6.0"
},
{
"id": "Microsoft.CodeAnalysis.CSharp",
"previousReleaseVersion": "5.6.0"
},
{
"id": "Microsoft.CodeAnalysis.VisualBasic",
"previousReleaseVersion": "5.6.0"
},
{
"id": "Microsoft.CodeAnalysis.CSharp.Workspaces",
"previousReleaseVersion": "5.6.0"
},
{
"id": "Microsoft.CodeAnalysis.VisualBasic.Workspaces",
"previousReleaseVersion": "5.6.0"
}
]
}
24 changes: 23 additions & 1 deletion eng/pipelines/build-windows-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ parameters:
- name: buildArguments
type: string
default: ''
- name: buildNuGetUpgradePayload
type: boolean
default: false

jobs:
- job: ${{ parameters.jobName }}
Expand Down Expand Up @@ -50,6 +53,26 @@ jobs:
filePath: eng/build.ps1
arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -build -binaryLogName Build.binlog -skipDocumentation ${{ parameters.buildArguments }}

- ${{ if eq(parameters.buildNuGetUpgradePayload, true) }}:
- task: PowerShell@2
displayName: Build NuGet Packages for Upgrade Payload
inputs:
filePath: eng/build.ps1
arguments: -configuration ${{ parameters.configuration }} -prepareMachine -ci -restore -pack -binaryLogName Pack.binlog

- task: PowerShell@2
displayName: Prepare NuGet Package Upgrade Payload
inputs:
filePath: eng/prepare-nuget-package-upgrade-payload.ps1
arguments: -Configuration ${{ parameters.configuration }}

- task: PublishPipelineArtifact@1
displayName: Publish NuGet Package Upgrade Payload
inputs:
targetPath: '$(Build.SourcesDirectory)\artifacts\packageValidation\${{ parameters.configuration }}'
artifactName: Roslyn_NuGet_Packages_${{ parameters.configuration }}
condition: succeeded()

- template: post-cache-roslyn-outputs.yml
parameters:
configuration: ${{ parameters.configuration }}
Expand All @@ -72,4 +95,3 @@ jobs:
parameters:
configuration: ${{ parameters.configuration }}
jobName: ${{ parameters.jobName }}

27 changes: 21 additions & 6 deletions eng/pipelines/test-integration-helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ parameters:
- name: configuration
type: string
default: 'Debug'
values: [ 'Debug', 'Release' ]
values: [ 'Debug', 'Release' ]
- name: timeout
type: number
# Test filter applied to every test run in this stage. Ordinary integration runs exclude the
# NuGet package upgrade validation tests, which are only run by a dedicated job that opts in
# with 'TestGate=NuGetPackageUpgrade'.
- name: testFilter
type: string
default: 'TestGate!=NuGetPackageUpgrade'
- name: testRuns
type: object
default:
- oop64bit: true
lspEditor: false
runName: 64


stages:
- stage: Windows_${{ parameters.configuration }}_Build
Expand All @@ -28,17 +34,26 @@ stages:
jobName: Build_Windows_${{ parameters.configuration }}
testArtifactName: Transport_Artifacts_Windows_${{ parameters.configuration }}
configuration: ${{ parameters.configuration }}
poolParameters:
poolParameters:
name: ${{ parameters.poolName }}
demands: ImageOverride -equals ${{ parameters.buildQueueName }}
restoreArguments: -msbuildEngine vs
buildArguments: -msbuildEngine vs /p:Projects='"$(Build.Repository.LocalPath)\src\VisualStudio\IntegrationTest\IntegrationTestBuildProject.csproj"'
# Release integration builds also stage Roslyn NuGet packages for legacy packages.config
# upgrade validation. DartLab integration gates use separate templates and intentionally
# do not include this payload publication path.
buildNuGetUpgradePayload: ${{ eq(parameters.configuration, 'Release') }}

- stage: ${{ parameters.configuration }}_Integration
dependsOn: Windows_${{ parameters.configuration }}_Build
variables:
- name: XUNIT_LOGS
value: $(Build.SourcesDirectory)\artifacts\log\${{ parameters.configuration }}
- name: TestFilterArgument
${{ if ne(parameters.testFilter, '') }}:
value: -testFilter "${{ parameters.testFilter }}"
${{ else }}:
value: ''
jobs:
- ${{ each testParameters in parameters.testRuns }}:
- job: ${{ testParameters.runName }}
Expand All @@ -60,7 +75,7 @@ stages:
filename: ./artifacts/bin/RunTests/${{ parameters.configuration }}/net10.0/rehydrate.cmd
env:
HELIX_CORRELATION_PAYLOAD: '$(Build.SourcesDirectory)\.duplicate'

# This is a temporary step until the actual test run moves to helix (then we would need to rehydrate the tests there instead)
- task: BatchScript@1
displayName: Rehydrate Microsoft.VisualStudio.LanguageServices.New.IntegrationTests
Expand Down Expand Up @@ -111,7 +126,7 @@ stages:
displayName: Run Integration Tests
inputs:
filePath: eng/build.ps1
arguments: -ci -prepareMachine -testVsi -configuration ${{ parameters.configuration }} -oop64bit:$${{ testParameters.oop64bit }} -collectDumps -lspEditor:$${{ testParameters.lspEditor }}
arguments: -ci -prepareMachine -testVsi -configuration ${{ parameters.configuration }} -oop64bit:$${{ testParameters.oop64bit }} -collectDumps -lspEditor:$${{ testParameters.lspEditor }} $(TestFilterArgument)

# These are temporary publishing steps - once the tests run on helix, the artifacts will be attached to the helix payload.
- task: PublishTestResults@2
Expand All @@ -132,7 +147,7 @@ stages:
publishLocation: Container
continueOnError: true
condition: not(succeeded())

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
Expand Down
Loading
Loading